https://github.com/xtuc/compose-filters
https://twitter.com/alexandereardon/status/905955091638837251
https://github.com/xtuc/compose-filters
Last synced: over 1 year ago
JSON representation
https://twitter.com/alexandereardon/status/905955091638837251
- Host: GitHub
- URL: https://github.com/xtuc/compose-filters
- Owner: xtuc
- License: mit
- Created: 2017-09-08T20:19:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-13T09:08:43.000Z (almost 9 years ago)
- Last Synced: 2025-03-17T11:52:45.497Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# compose-filters
> https://twitter.com/alexandereardon/status/905955091638837251
### Example
```js
const {composeFilters} = require('compose-filters');
const isA = (x) => x === 'a';
const isB = (x) => x === 'b';
const filter = composeFilters(isA, isB);
assert.deepEqual(
filter(['a', 'b', 'c']),
['a', 'b'],
);
```