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, Object
Maps and objects are very similar, but they have some differences that can help you decide which one better fits your use-case.
JavaScript, String
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, Browser
Creates a hash for a value using the SHA-256 algorithm. Returns a promise.
JavaScript, Array
Converts an array of objects to a comma-separated values (CSV) string that contains only the columns
specified.
JavaScript, Math
Implements the Luhn Algorithm, used to validate a variety of identification numbers.
JavaScript, Accessibility
Accessibility (a11y) can improve your website and attract new users. Learn how to get started with these 8 quick tips.
JavaScript, Browser
Learn all of the options JavaScript provides for modifying the URL of the current page in the browser without reloading the page.
JavaScript, Object
Learn how you can compare two objects in JavaScript using various different techniques.
JavaScript, Function
JavaScript uses callback functions in various places for different purposes. From event listeners to asynchronous operations, they are an invaluable tool you need to master.
JavaScript, Object
Deeply removes all falsy values from an object or array.
JavaScript, Algorithm
Sorts an array of numbers, using the heapsort algorithm.
JavaScript, Object
Generates an object from the given query string or URL.
JavaScript, Object
Replaces the names of multiple object keys with the values provided.
JavaScript, String
Converts an hsl()
color string to an object with the values of each color.
JavaScript, String
Converts an rgb()
color string to an object with the values of each color.