Skip to content

steveukx/Promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Minimal promise implementation for JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published