1.0.0 • Published 7 years ago

p-over-every v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

p-over-every

overEvery for Promises (async, no concurrency)

Accepts synchronous and asynchronous (promise-returning) predicates.

It calls functions in order, that is, put your sync predicates at the beginning to optimize for execution time.

Usage

const isPair = x => x % 2
const isGtFour = x => Promise.resolve(x > 4)
const predicates = [isPair, isGtFour]
pOverEvery(predicates)(5).then(/* true */)

Inspiration

License

MIT http://gunar.mit-license.org