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.
Assigns default values for all properties in an object that are undefined
.
JavaScript, Object · Oct 22, 2020
Finds all the keys in the provided object that match the given value.
JavaScript, Object · Nov 15, 2020
Creates a new object, converting each key to a Symbol
.
JavaScript, Object · Aug 1, 2021
Dynamically adding object properties can be pretty slow in some cases. Here's how to optimize it.
JavaScript, Object · Nov 2, 2022
Validates all keys in an object match the given keys
.
JavaScript, Object · Jul 18, 2021
Binds methods of an object to the object itself, overwriting the existing method.
JavaScript, Object · Nov 3, 2020
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, Type · Oct 20, 2020
Freezing objects is not the only way to prevent mutations. Learn how you can leverage the Proxy object to your advantage.
JavaScript, Object · Apr 10, 2022
Combines two arrays of objects, using the specified key to match objects.
JavaScript, Array · Oct 7, 2020
Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function.
JavaScript, Object · Oct 21, 2020
Converts an array of objects into an array of values corresponding to the specified key
.
JavaScript, Array · Oct 22, 2020
Gets the size of an array, object or string.
JavaScript, Object · Jan 20, 2023
Property enumerability dictates how JavaScript object properties behave in different scenarios.
JavaScript, Object · Sep 11, 2022