filter-match

0.0.3 • Public • Published

filter-match

Matching action filters by patterns

Build Status

Install

npm install filter-match

Usage

const match = require('filter-match');
 
match('show', { only: ['show'] }); // true
match('show', { except: ['show'] }); // false
 
match.filter('show', [{
  value: '1',
  except: ['show']
}, {
  value: '2',
  only: ['show']
}]); // [{ value: '2', only: ['show'] }]

Readme

Keywords

Package Sidebar

Install

npm i filter-match

Weekly Downloads

2

Version

0.0.3

License

MIT

Last publish

Collaborators

  • luin