1.0.0 • Published 9 years ago
promise-and v1.0.0
promise-and
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)
Name | Type | Description |
---|---|---|
...args | Mixed | Values to run && between |
Returns: Promise
, which resolves to the first "falsey" value among the arguments.
Related
License
MIT © Joakim Carlstein
1.0.0
9 years ago