promise-lite

0.0.5 • Public • Published

Promise.js

Installation

Promise can be used either in a Node.js environment or in a browser, to install for Node.js use the npm package manager:

npm install promise-lite

To use in the browser, you just need the src/promise.js file and the Subscribable library that is used to handle the pub-sub events Promise uses internally.

Usage

The Promise constructor in Node.js is required by:

var Promise = require('promise-lite');

In a browser, Promise will be declared in window scope anyway so can just be used as Promise.

Promises are used to make otherwise asynchronous actions chainable, by linking them together with the Promise that they will return a value at some point in the future.

Readme

Keywords

none

Package Sidebar

Install

npm i promise-lite

Weekly Downloads

0

Version

0.0.5

License

none

Last publish

Collaborators

  • steveukx