0.0.0 • Published 7 years ago

simple-search-parser v0.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

simple search parser

Parses expressions like:

  • "Cars or Boats"
  • "Donald and not Trump"
  • "Snakes and Planes"
  • "Cars or Boats and not Snakes"

And returns a function that matches strings on the given expression.

install

npm install simple-search-parser

usage

const parse = require('simple-search-parser');

const match = parse('Cars or Boats');

match('I like cars!'); // ==> true