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, Type
Checks if the a value is an empty object/collection, has no enumerable properties or is any type that is not considered a collection.
JavaScript, Object
Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function.
JavaScript, Object
Converts an object to a Map
.
JavaScript, Function
Creates a function that invokes the method at a given key of an object, optionally prepending any additional supplied parameters to the arguments.
JavaScript, Array
Combines two arrays of objects, using the specified key to match objects.
JavaScript, Object
Converts a Map
to an object.
JavaScript, Array
Converts an array of objects into an array of values corresponding to the specified key
.
JavaScript, Object
Gets the size of an array, object or string.
JavaScript, Object
Checks if the predicate function is truthy for all elements of a collection.
JavaScript, Function
The constructor is arguably the most crucial part of any JavaScript class, which is why you might want to take a closer look at what they return.
JavaScript, Object
Dynamically adding object properties can be pretty slow in some cases. Here's how to optimize it.
JavaScript, Object
Freezing objects is not the only way to prevent mutations. Learn how you can leverage the Proxy object to your advantage.
JavaScript, Object
Property enumerability dictates how JavaScript object properties behave in different scenarios.
JavaScript, Function
Creates a function that invokes fn
with a given context, optionally prepending any additional supplied parameters to the arguments.
JavaScript, Object
Checks if an object is deeply frozen.