Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azz/simple-search-parser
Simple text search parser
https://github.com/azz/simple-search-parser
Last synced: 2 days ago
JSON representation
Simple text search parser
- Host: GitHub
- URL: https://github.com/azz/simple-search-parser
- Owner: azz
- Created: 2016-11-20T05:13:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-20T05:37:31.000Z (about 8 years ago)
- Last Synced: 2024-04-24T14:29:27.043Z (8 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
npm install simple-search-parser
```## usage
```js
const parse = require('simple-search-parser');const match = parse('Cars or Boats');
match('I like cars!'); // ==> true
```