keywords-match

1.0.2 • Public • Published

keywords-match Build Status

Demo

Try it out on CodeSandBox

Usage

const matcher = require('keywords-matcher');
const collection = ['cat''lion''sandcat''catfish'];
const expression = 'cat -fish';
const result = matcher(expression, collection);
console.log(result); // ['cat''sandcat']

Supported operators

  • ' ' (space) - Means both expressions are required
  • '|' (pipeline) - Means at least one expression is required
  • '-' (dash) - Means the following expression must not be met
  • expression - The filtered string contains the expression

Operators in progress

  • '""' (quotes) - Means the expression is matched exactly

Installation

npm i keywords-match

Package Sidebar

Install

npm i keywords-match

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

97.1 kB

Total Files

27

Last publish

Collaborators

  • ebmoha
  • eranb