a-promise

A lightweight Promise implementation in NodeJS

Use sb-promise instead
Last updated 11 years ago by steelbrain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install a-promise 
SYNC missed versions from official npm registry.

A Promise

An extremely lightweight Promise Polyfill for Node and Browsers. It doesn't support all the features yet, but It supports what a normal person needs to keep the code clean. If you need something added, just open an issue.

Installation

npm install a-promise

Example

In case you don't know what Promises are, then this example should give you a basic intro.

function MyFunction(Num){
  return new Promise(function(Resolve, Reject){
    // Do something asyncly
    Resolve(Num * 100);
  });
}
MyFunction(5).then(function(Result){
  console.log(Result); // Outputs 500
});

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

19 Versions

  • 1.0.0 [deprecated]           ...           11 years ago
  • 0.2.1 [deprecated]           ...           11 years ago
  • 0.2.0 [deprecated]           ...           11 years ago
  • 0.1.2 [deprecated]           ...           12 years ago
  • 0.1.1 [deprecated]           ...           12 years ago
  • 0.1.0 [deprecated]           ...           12 years ago
  • 0.0.13 [deprecated]           ...           12 years ago
  • 0.0.12 [deprecated]           ...           12 years ago
  • 0.0.11 [deprecated]           ...           12 years ago
  • 0.0.10 [deprecated]           ...           12 years ago
  • 0.0.9 [deprecated]           ...           12 years ago
  • 0.0.8 [deprecated]           ...           12 years ago
  • 0.0.7 [deprecated]           ...           12 years ago
  • 0.0.6 [deprecated]           ...           12 years ago
  • 0.0.5 [deprecated]           ...           12 years ago
  • 0.0.4 [deprecated]           ...           12 years ago
  • 0.0.3 [deprecated]           ...           12 years ago
  • 0.0.2 [deprecated]           ...           12 years ago
  • 0.0.1 [deprecated]           ...           12 years ago
Maintainers (1)
Downloads
Total 57
Today 0
This Week 0
This Month 57
Last Day 0
Last Week 25
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE