1.0.0 • Published 10 years ago

promise-not v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

promise-not

Build status NPM version js-xo-style

The NOT (!) operator for promises

Installation

Install promise-not using npm:

npm install --save promise-not

Usage

Module usage

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

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

API

not(val)

NameTypeDescription
valMixedValue to run ! on

Returns: Promise, which resolves to the invers of what val resolves to.

Related

License

MIT © Joakim Carlstein