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.
Parses an HTTP Cookie header string, returning an object of all cookie name-value pairs.
JavaScript, Browser · Oct 22, 2020
Mutates the original array to filter out the values specified, based on a given iterator function.
JavaScript, Array · Oct 22, 2020
Generates an object from the given query string or URL.
JavaScript, Object · Nov 3, 2020
Replaces the names of multiple object keys with the values provided.
JavaScript, Object · Oct 22, 2020
A collection of regular expressions that can be used to solve common problems.
JavaScript, String · Nov 9, 2022
JavaScript arrow functions are a very useful tool to learn and master. Here's a complete introduction to everything you need to know.
JavaScript, Function · Jun 12, 2021
JavaScript's built-in Boolean function can be very useful for truth-checking data among other things. Learn how to use it and level up your code today.
JavaScript, Function · Jun 12, 2021
Deeply removes all falsy values from an object or array.
JavaScript, Object · Nov 27, 2020
Sorts an array of numbers, using the heapsort algorithm.
JavaScript, Algorithm · Dec 28, 2020
Generates all permutations of an array's elements (contains duplicates).
JavaScript, Array · Dec 28, 2020
Creates an array of arrays, ungrouping the elements in an array produced by zip.
JavaScript, Array · Oct 22, 2020
ESLint is a very powerful tool that can save you a lot of headaches, but sometimes it gets in the way. Learn how to refactor code to get rid of a common warning.
JavaScript, Array · Jun 12, 2021
JavaScript callbacks are especially tricky when you're not careful. Take a deeper dive into potential issues and how to avoid them.
JavaScript, Function · Jul 1, 2021
Understand how events work in JavaScript and learn when to use event bubbling, event capturing and event delegation with this short guide.
JavaScript, Browser · Jun 12, 2021
Learn the differences between the three most commonly used iteration methods offered by JavaScript, which often confuse beginners and veterans alike.
JavaScript, Array · Jun 12, 2021