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.
Delays the execution of an asynchronous function.
JavaScript, Function · Oct 22, 2020
How JavaScript handles passing data is a source of confusion and bugs for many developers, especially when it comes to object types.
JavaScript, Function · Dec 5, 2021
Messing up the order of chained then
and catch
methods in JavaScript promises can result in all sorts of problems. Here's a short primer on the subject.
JavaScript, Function · Jun 12, 2021
Takes a function as an argument, then makes the first argument the last.
JavaScript, Function · Jun 13, 2021
Checks if the given argument is an async
function.
JavaScript, Type · Oct 20, 2020
Checks if the given argument is a generator function.
JavaScript, Type · Oct 20, 2020
Learn everything you need to know about JavaScript's Function.prototype.call()
, Function.prototype.apply()
and Function.prototype.bind()
with this short guide.
JavaScript, Function · Jun 12, 2021
Recursion is a very important programming concept all developers should be familiar with.
JavaScript, Function · Jan 23, 2022
Creates a function that invokes fn
with partials
prepended to the arguments it receives.
JavaScript, Function · Sep 15, 2020
Creates a function that invokes fn
with partials
appended to the arguments it receives.
JavaScript, Function · Sep 15, 2020
Invokes the provided function after ms
milliseconds.
JavaScript, Function · Oct 19, 2020
Generates an array with the given amount of items, using the given function.
JavaScript, Array · Oct 22, 2020
Creates a generator, that generates all values in the given range using the given step.
JavaScript, Function · Oct 11, 2020
Aborting a fetch request in JavaScript is a common problem. Here's how to handle it correctly.
JavaScript, Function · May 15, 2022