op

oli-promise

A promise/A+ implementation.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

1

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

1.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Promise

通过了 promises-aplus-tests 和 promises-es6-tests 这两个测试,包括 Deferred 的写法。

用法

像普通的 promise 框架那样

var p =
  new Promise(function (resolve) {
    setTimeout(function () {
      console.log('first');
      resolve(true);
    }, 1000);
  })
  .delay(1000)
  .then(function(value) {
    console.log('finally:', value);
  })

方法列表

  • then
  • catch
  • done
  • delay
  • Promise.resolve
  • Promise.reject
  • Promise.all
  • Promise.race
  • Promise.deferred
  • Promise.defer

谢谢~

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100