Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

lie

Package Overview
Dependencies
1
Maintainers
1
Versions
47
Issues
File Explorer

Advanced tools

lie

A basic but performant promise implementation

    3.3.0latest
    Github

Version published
Maintainers
1
Weekly downloads
8,003,186
increased by8.69%

Weekly downloads

Changelog

Source

3.3.0

fine I'll include some typescript junk

Readme

Source

lie

Promises/A+ logo [![Build Status](https://travis-ci.org/calvinmetcalf/lie.svg)](https://travis-ci.org/calvinmetcalf/lie)

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.

Keywords

FAQs

What is lie?

A basic but performant promise implementation

Is lie popular?

The npm package lie receives a total of 7,693,601 weekly downloads. As such, lie popularity was classified as popular.

Is lie well maintained?

We found that lie demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 06 Mar 2018

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc