1.0.6 • Published 7 years ago

only-object v1.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
7 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

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago