3.3.0 • Published 6 years ago

lie v3.3.0

Weekly downloads
4,384,269
License
MIT
Repository
github
Last release
6 years ago

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.

jszipjszip-setimmediatesendautomessengermessage@everything-registry/sub-chunk-2069d2l-insights-data-providersd2l-insights-roles-inputd2l-insights-utilsym-serialportyggdrasil-inference-stopgapencrypted-jszipenefti-galerivue-dev-cloneweb-adplay-sdkweb-pocketstom.dutton-localforagetotethalithe_helper_packagesthe_helper_packagetickbinterminalmanagertrumantrello-browseres6-translatezerialportz@feedoom/dbstorageuxcore-formuxcore-form-fielduxcore-listuxcore-cascade-selectuxcore-tableuxcore-table-sortableuxcore-select-form-fieldubox-libvast-playervastacularvalkyrja@hoodie/admin-client@hoodie/client@hoodie/store-client@hoodie/account-clientfgdbfilter-pouchfirebase-sign-in-with-ethereumzona-xzoku@inator/pouchdb-users@doist/localforageco-waitercmdspawndbgproxyprom-datedbstoragepromise-worker-nodepromise-worker-transferablepromise-benchdotphprambler-adblockrollup-prepublishserialport-builds-electronserialport-v4serialport-win-fixsaltuiscaledrone-nodescaledrone-react-nativerobomind-interpretershape2jsonshp2json-jsshp-geojsonsiesta-ormsocket-pouchsocket-pouchdbsocket.io-pouchslow-depsslow-deps-tnpmbq-js-local@catalpa_international/pouchdb-dump-cliclient-persistss-react-components@mars3d/shpjs@leslie8469/shpjsfra-lang-pack@movilizame/relational-pouchgpii-pouchdbdynamics-contracts-xfrau-http-telemetryhykhtml-connectorhs-serialporthoodie-plugin-store-cryptohoodie-clienthoodie-client-accounthoodie-client-connection-statushoodie-client-taskhoodie-client-task-queue@seculum/vue-dev-clone@shackpank/trumanjeep-localforagejson-courierjsonful
3.3.0

6 years ago

3.2.0

6 years ago

3.1.1

7 years ago

3.1.0

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.9.1

9 years ago

2.9.0

9 years ago

2.8.1

9 years ago

2.8.0

10 years ago

2.7.7

10 years ago

2.7.6

10 years ago

2.7.5

10 years ago

2.7.4

10 years ago

2.7.3

10 years ago

2.7.2

10 years ago

2.7.0

10 years ago

2.6.0

10 years ago

2.5.4

10 years ago

2.5.3

10 years ago

2.5.2

10 years ago

2.5.1

10 years ago

2.5.0

10 years ago

2.4.0

10 years ago

2.3.0

10 years ago

2.2.1

11 years ago

2.2.0

11 years ago

2.1.0

11 years ago

2.0.7

11 years ago

2.0.6

11 years ago

2.0.5

11 years ago

2.0.3

11 years ago

2.0.1

11 years ago

2.0.0

11 years ago

1.4.0

11 years ago

1.3.0

11 years ago

1.1.0

11 years ago

1.0.3

11 years ago

1.0.0

11 years ago

0.6.2

11 years ago

0.6.1

11 years ago

0.6.0

11 years ago

0.5.1

11 years ago

0.5.0

11 years ago