About
This dependency lets you set multiple non enumerated properties on an object at once. This can be done natively with the Object.defineProperties
method.
Itβs supported by all modern browsers and Node.js versions since about 6 years.
Example
// unless specified, added properties are non enumerable by default
Object.defineProperties(obj, {
foo: { value: "bar" },
baz: { value: "qux" }
});
Object.keys(obj); // []
While this dependency takes a 3rd argument to determine whether to overwrite existing properties, this functionality is very trivial to add yourself.
Not to mention this dependency comes with 28 dependencies of its own, which makes it a very heavy dependency for such a trivial task.