1.0.0 • Published 4 years ago

@m1yh3m/object.patch.node.lib v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

@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