Formatting numeric values in JavaScript
Learn common number formatting operations, such as rounding, padding, optional decimal marks, currency, seconds, bytes, and more.
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 common number formatting operations, such as rounding, padding, optional decimal marks, currency, seconds, bytes, and more.
A complete guide to case conversion in JavaScript, including camel case, kebab case, snake case, Pascal case, title case and sentence case.
Learn how to use the JavaScript ES6 spread syntax to converting iterables to arrays and level up your code today.
Creates an object containing the parameters of the current URL.
Learn how to parse or serialize a cookie with JavaScript, quickly and effectively.
Learn how to easily convert between the various color formats, using JavaScript and a few simple formulas.
Learn how to split a string into words, using the Intl.Segmenter
API.
Generate all permutations of an array's elements or a string's characters using recursion.
The Caesar cipher is a simple substitution cipher, which can be easily implemented with a few lines of JavaScript code.
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.
Converts an array of objects to a comma-separated values (CSV) string that contains only the columns
specified.
Easily convert an rgb()
color string to an array of values or an object with the values of each color.
A collection of regular expressions that can be used to solve common problems.
Learn how to use regular expressions to replace the last occurrence of a pattern in a JavaScript string.
Easily convert an hsl()
color string to an array of values or an object with the values of each color.
Roman numerals are often used for stylistic reasons, but converting an integer to a roman numeral can be a bit tricky.
Learn how to change the lightness component of an hsl()
color string using JavaScript.
Learn how to create a string with uppercase characters converted to lowercase and vice versa.
Learn how to convert a 3-digit RGB notated hexadecimal color-code to the 6-digit form.
Create a generator function that finds all the indexes of a substring in a given string.
Implement the Levenshtein distance algorithm in JavaScript to calculate the difference between two strings.
Wrap a string to a given number of characters using a string break character in JavaScript.
Counts the occurrences of a substring in a given string.
Learn how to convert text into HTML-safe strings and vice versa using JavaScript.