imacros-promise-polyfill

1.0.1 • Public • Published

This is a port of Taylor's Hakes promise-polyfill for use with iMacros and Browserify.

Node

npm install imacros-promise-polyfill

Simple usage

var Promise = require('imacros-promise-polyfill');
 
var promise = new Promise(function(resolve, reject) {
  // do a thing, possibly async, then…
 
  if (/* everything turned out fine */) {
    resolve("Stuff worked!");
  }  else {
    reject(new Error("It broke"));
  }
});
 
// Do something when async done
promise.then(function() {
  ...
});

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 4.0.1
    0

Package Sidebar

Install

npm i imacros-promise-polyfill

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • cyxou