npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

promise-every

1.1.1

@yoshuawuyts

npmHomeRepoSnykSocket
Downloads:186
$ npm install promise-every
DailyWeeklyMonthlyYearly

promise-every

NPM version build status Test coverage Downloads

Test each value in an array with every and return a Promise.

Installation

$ npm install promise-every

Usage

const every = require('promise-every')

Promise.resolve(['bin', 'baz', 123])
  .then(every((val) => 'string' == typeof val))
// => false

Why?

This module is basically equivalent to Array.every. It's packaged as a single module because 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 reduce your javascript bundle size.

Works great in the browser with browserify!

See Also

  • promise-filter
  • promise-each
  • promise-map
  • promise-reduce
  • promise-some

License

MIT