Thanks to visit codestin.com
Credit goes to github.com

Skip to content

joakimbeng/promise-and

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The AND (&&) operator for promises

Resources

Stars

Watchers

Forks

Packages

No packages published