Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Minimal promise implementation for JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dist/0.0.5
src
test
.gitignore
.npmignore
GruntFile.js
README.md
package.json

README.md

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.

Something went wrong with that request. Please try again.