value-matcher
Install
Installation of the npm package:
> npm install --save value-matcher
Usage
import { createPredicate } from 'value-matcher'
;[
{ user: 'sam', age: 65, active: false },
{ user: 'barney', age: 36, active: true },
{ user: 'fred', age: 40, active: false },
].filter(
createPredicate({
__or: [{ user: 'sam' }, { active: true }],
})
)
// [
// { user: 'sam', age: 65, active: false },
// { user: 'barney', age: 36, active: true },
// ]
Contributions
Contributions are very welcomed, either on the documentation or on the code.
You may:
- report any issue you've encountered;
- fork and create a pull request.