An Introduction to JavaScript Proxy
A quick introduction to the JavaScript Proxy object and where it can be used.
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.
A quick introduction to the JavaScript Proxy object and where it can be used.
Groups the elements of an array based on the given function.
Convert all the keys of an object to upper or lower case.
Using the Proxy object, we can create dynamic getters and setters for objects in JavaScript.
Find all the keys in a JavaScript object that match the given value.
Creates an object from an array, using a function to map each value to a key.
Learn how to transform objects by filtering their properties based on an array of keys or a predicate function.
Inverts the key-value pairs of an object, without mutating it.
Have you ever wanted to serialize an object but only include certain keys? Turns out JavaScript provides an easy way to do this!
Using the Proxy object, we can create chainable dynamic getters for objects in JavaScript.
Iterate over all own properties of an object, running a callback for each one.
Nests recursively objects linked to one another in a flat array.
JavaScript's strict mode can make your code faster, cleaner and more secure.
Learn how to type check objects at runtime using the powerful Proxy object in JavaScript.
Turns out the Proxy object is not extensible, but there's a way around its limitations.
Learn the basics of the destructuring assignment syntax in JavaScript ES6 and improve your code with this easy guide.
Map the values of an array to an object, using the given mapping functions.
Check the properties of an object against an array of keys or another object to ensure they match.
Learn how mutability works in JavaScript, its applications to objects and how you can properly freeze them to make them constant.
Performs a deep comparison between two values to determine if they are equivalent.
Compare two objects to determine if the first one contains equivalent property values to the second one.
Pretty-printing JSON objects in pretty easy and customizable in JavaScript. Here's the gist of it.
Static and instance methods are pretty easy to distinguish and serve different purposes. Learn all about them in this article.
Adding a key-value pair to a JavaScript object is straightforward, yet there are multiple ways available to do so.