defer-js

0.0.1 • Public • Published

defer

  • A lightweighted promise library follow Promise / A+ standards.

NPM version Build Status Coverage Status

I think if you want to build your own promise, the main part is to maintain a state machine, you should know how to transform state between pending, fulfilled and rejected.

Promise standard:

Promise/A+

Reference:

  • H5 rocks promise tutorials(http://www.html5rocks.com/en/tutorials/es6/promises/)
    
  • Open source Promise/A+ standard(https://promisesaplus.com/)
    
  • ECMAScript language specification ECMA-262 6th edition promise part(http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects).
    

Realize step:

  • How to realize resolve, reject, then base on https://github.com/promises-aplus/promises-spec
    

Features that the library contains:

  • parallel promise
    

Support:

  • Both Browser and Node.js environment.

To do...

  • I will use mocha to write some case later.
    

Readme

Keywords

Package Sidebar

Install

npm i defer-js

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • cpselvis