lie

A basic but performant promise implementation.

Latest version: 3.3.0 registry icon
Maintenance score
0
Safety score
0
Popularity score
72
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
3.3.0 0 0 0 0 0
3.2.0 0 0 0 0 0
3.1.1 0 0 0 0 0
3.1.0 0 0 0 0 0
3.0.4 0 0 0 0 0
3.0.3 0 0 0 0 0
3.0.2 0 0 0 0 0
3.0.1 0 0 0 0 0
3.0.0 0 0 0 0 0
2.9.1 0 0 0 0 0
2.9.0 0 0 0 0 0
2.8.1 0 0 0 0 0
2.8.0 0 0 0 0 0
2.7.7 0 0 0 0 0
2.7.6 0 0 0 0 0
2.7.5 0 0 0 0 0
2.7.4 0 0 0 0 0
2.7.3 0 0 0 0 0
2.7.2 0 0 0 0 0
2.7.0 0 0 0 0 0
2.6.0 0 0 0 0 0
2.5.4 0 0 0 0 0
2.5.3 0 0 0 0 0
2.5.2 0 0 0 0 0
2.5.1 0 0 0 0 0
2.5.0 0 0 0 0 0
2.4.0 0 0 0 0 0
2.3.0 0 0 0 0 0
2.2.1 0 0 0 0 0
2.2.0 0 0 0 0 0
2.1.0 0 0 0 0 0
2.0.7 0 0 0 0 0
2.0.6 0 0 0 0 0
2.0.5 0 0 0 0 0
2.0.3 0 0 0 0 0
2.0.1 0 0 0 0 0
2.0.0 0 0 0 0 0
1.4.0 0 0 0 0 0
1.3.0 0 0 0 0 0
1.1.0 0 0 0 0 0
1.0.3 0 0 0 0 0
1.0.0 0 0 0 0 0
0.6.2 0 0 0 0 0
0.6.1 0 0 0 0 0
0.6.0 0 0 0 0 0
0.5.1 0 0 0 0 0
0.5.0 0 0 0 0 0

Stability
Latest release:

3.3.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



lie

Promises/A+ logo Build status

lie is a small, performant promise library implementing the Promises/A+ spec (Version 1.1).

Originally a fork of Ruben Verborgh's promiscuous, with version 2.6 it became a fork of ayepromise by Chris Burgmer.

npm install lie
var Promise = require('lie');
// or use the pollyfill
require('lie/polyfill');

Usage

Either use it with browserify (recommended) or grab one of the files from the dist folder:

  • lie.js/lie.min.js exposes 'Promise' either as a UMD module or from the global scope, depending on if a CJS or AMD loader is available.
  • lie.polyfill.js/lie.polyfill.min.js adds 'Promise' to the global scope only if it's not already defined (not a UMD).

API

Implements the standard ES6 api:

new Promise(function(resolve, reject){
    doSomething(function(err, result) {
        if (err) {
            reject(err);
        } else {
            resolve(result);
        }
    });
}).then(function (value) {
    //on success
}, function (reason) {
    //on error
}).catch(function (reason) {
    //shortcut for error handling
});

Promise.all([
    //array of promises or values
]).then(function ([/* array of results */]));

Promise.race([
    //array of promises or values
]);
// either resolves or rejects depending on the first value to do so

Unhandled Rejections

In Node.js, lie emits an unhandledRejection event when a rejected promise isn't caught, in line with how io.js does it. This allows it to act as a promise shim in both Node.js and the browser.