filter-match
v0.0.3
Published
Selecting action filters by patterns
Downloads
3
Readme
filter-match
Matching action filters by patterns
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'] }]