Skip to content

joakimbeng/promise-not

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Name Type Description
val Mixed Value to run ! on

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

Related

License

MIT © Joakim Carlstein

About

The NOT (!) operator for promises

Resources

Stars

Watchers

Forks

Packages

No packages published