1.0.0 • Published 9 years ago

promise-and v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

promise-and

Build status NPM version js-xo-style

The AND (&&) operator for promises

Installation

Install promise-and using npm:

npm install --save promise-and

Usage

Module usage

var and = require('promise-and');

and(Promise.resolve(true), Promise.resolve(false))
  .then(function (val) {
    // val === false
  });

API

and(...args)

NameTypeDescription
...argsMixedValues to run && between

Returns: Promise, which resolves to the first "falsey" value among the arguments.

Related

License

MIT © Joakim Carlstein