0.0.3 • Published 9 years ago

filter-match v0.0.3

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

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'] }]