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.
Learn how to use the JavaScript ES6 spread syntax to converting iterables to arrays and level up your code today.
JavaScript, Object · Jun 12, 2021
Creates an object containing the parameters of the current URL.
JavaScript, Browser · Oct 22, 2020
Returns the human-readable format of the given number of milliseconds.
JavaScript, Date · Oct 22, 2020
Converts a comma-separated values (CSV) string to a 2D array of objects. The first row of the string is used as the title row.
JavaScript, String · Jan 30, 2022
Converts an array of objects to a comma-separated values (CSV) string that contains only the columns
specified.
JavaScript, Array · Oct 13, 2021
Changes the lightness value of an hsl()
color string.
JavaScript, String · Oct 31, 2020
A collection of regular expressions that can be used to solve common problems.
JavaScript, String · Nov 9, 2022
Parses an HTTP Cookie header string, returning an object of all cookie name-value pairs.
JavaScript, Browser · Oct 22, 2020
Copies a string to the clipboard. Only works as a result of user action (i.e. inside a click
event listener).
JavaScript, Browser · Jan 11, 2022
Finds all the indexes of a substring in a given string.
JavaScript, String · Dec 31, 2020
Converts an hsl()
color string to an object with the values of each color.
JavaScript, String · Oct 22, 2020
Converts an rgb()
color string to an object with the values of each color.
JavaScript, String · Oct 22, 2020
Encrypts or decrypts a given string using the Caesar cipher.
JavaScript, Algorithm · Dec 29, 2020