1.0.6 • Published 6 years ago

only-object v1.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

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

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago