only-object

1.0.6 • Public • Published

only-object

NPM version build status Test coverage

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',
}

Readme

Keywords

Package Sidebar

Install

npm i only-object

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

5.51 kB

Total Files

5

Last publish

Collaborators

  • mayness