The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
JavaScript, String
Replaces the last occurrence of a pattern in a string.
JavaScript, String
A collection of regular expressions that can be used to solve common problems.
JavaScript, Date
Returns the ISO format of the given number of seconds.
JavaScript, String
Extends a 3-digit color code to a 6-digit color code.
JavaScript, String
Creates a new string with the results of calling a provided function on every character in the given string.
JavaScript, Browser
Copies a string to the clipboard, returning a promise that resolves when the clipboard's contents have been updated.
JavaScript, String
Counts the occurrences of a substring in a given string.
JavaScript, String
Creates a string with uppercase characters converted to lowercase and vice versa.
JavaScript, String
Converts a string to title case.
JavaScript, String
Generates all permutations of a string (contains duplicates).
JavaScript, String
Converts a string to camelcase.
JavaScript, String
Converts a string to pascal case.
JavaScript, String
Converts a string to snake case.
JavaScript, String
Joins all given URL segments together, then normalizes the resulting URL.
JavaScript, String
Converts a color code to an rgb()
or rgba()
string if alpha value is provided.