promise-and

1.0.0 • Public • Published

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)

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

Package Sidebar

Install

npm i promise-and

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • joakimbeng