1.1.0 • Published 10 years ago
promise-some v1.1.0
promise-some
Check if some element in an array passes the test and return a Promise.
Installation
$ npm install promise-someUsage
const some = require('promise-some')
Promise.resolve([1, 2, 3])
.then(some((val) => val >= 2)))
// => trueWhy?
This module is basically equivalent to bluebird.some, but it's handy
to have the one function you need instead of a kitchen sink. Modularity!
Especially handy if you're serving to the browser and need to some your
javascript bundle size.
Works great in the browser with browserify!