only-object
1.0.6 • Public • Published only-object
filter object tool
Usage
const onlyObject = require('only-object');
const obj = {
a: 1,
b: '2',
c: 3,
};
const filter = onlyObject.filter(obj, [ 'a', 'c' ]);
const reduce = onlyObject.reduce(obj, [ 'a', 'c' ]);
filter yields:
{
a: 1,
c: 3,
}
reduce yields:
{
b: '2',
}
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.6
2
Version History
Package Sidebar
Install
Weekly Downloads