0.2.0 • Published 6 years ago

value-matcher v0.2.0

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

value-matcher Build Status

${pkg.description}

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 },
// ]

Development

# Install dependencies
> yarn

# Run the tests
> yarn test

# Continuously compile
> yarn dev

# Continuously run the tests
> yarn dev-test

# Build for production (automatically called by npm install)
> yarn build

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.

License

ISC © Vates SAS