promise-not
v1.0.0
Published
The NOT (!) operator for promises
Downloads
2
Maintainers
Readme
promise-not
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