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.
Converts a color code to an rgb()
or rgba()
string if alpha value is provided.
JavaScript, String · Oct 19, 2020
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters).
JavaScript, String · Oct 20, 2020
A short guide on how to correctly construct a URL in JavaScript.
JavaScript, String · Feb 26, 2023
Regular expressions are a very useful tool in a variety of situations. Save this cheatsheet for any time you need to look up their syntax and speed up your development.
JavaScript, String · Jun 12, 2021
Converts a 2D array to a comma-separated values (CSV) string.
JavaScript, Array · Nov 3, 2020
Alphabetically sorts the characters in a string.
JavaScript, String · Oct 22, 2020
Avoid the naive approach and use a more robust method to edit URL parameters in JavaScript.
JavaScript, String · Dec 7, 2022