Skip to content

Check if some element in an array passes the test and return a Promise

License

Notifications You must be signed in to change notification settings

yoshuawuyts/promise-some

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promise-some

NPM version build status Test coverage Downloads

Check if some element in an array passes the test and return a Promise.

Installation

$ npm install promise-some

Usage

const some = require('promise-some')

Promise.resolve([1, 2, 3])
  .then(some((val) => val >= 2)))
// => true

Why?

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!

See Also

License

MIT

About

Check if some element in an array passes the test and return a Promise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published