0.7.1 • Published 10 months ago

complex-matcher v0.7.1

Weekly downloads
6
License
ISC
Repository
github
Last release
10 months ago

complex-matcher

Package Version License PackagePhobia Node compatibility

Advanced search syntax used in XO

Install

Installation of the npm package:

npm install --save complex-matcher

Usage

import * as CM from 'complex-matcher'

const characters = [
  { name: 'Catwoman', costumeColor: 'black' },
  { name: 'Superman', costumeColor: 'blue', hasCape: true },
  { name: 'Wonder Woman', costumeColor: 'blue' },
]

const predicate = CM.parse('costumeColor:blue hasCape?').createPredicate()

characters.filter(predicate)
// [
//   { name: 'Superman', costumeColor: 'blue', hasCape: true },
// ]

new CM.String('foo').createPredicate()

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

0.7.1

10 months ago

0.7.0

3 years ago

0.6.0

5 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.0

6 years ago