1.0.0 • Published 10 years ago
promise-not v1.0.0
promise-not
The NOT (!) operator for promises
Installation
Install promise-not using npm:
npm install --save promise-notUsage
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
1.0.0
10 years ago