1.0.0 • Published 4 years ago
@m1yh3m/object.patch.node.lib v1.0.0
@m1yh3m/object.patch.node.lib
Patches Object.prototype with functions.
usage
const { patch, depatch } = require("@m1yh3m/object.patch.node.lib");
patch();
var x = { a: "b", c: "d" };
x.toKeyValueArray();
// [ { key: 'a', value: 'b' }, { key: 'c', value: 'd' } ]
x.keys();
// [ 'a', 'c' ]
x.values();
// [ 'b', 'd' ]
depatch();
x.toKeyValueArray();
// TypeError: x.toKeyValueArray is not a function
1.0.0
4 years ago