1.0.2 • Published 9 years ago

syncpromise v1.0.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
9 years ago

SyncPromise

SyncPromise is an incomplete implementation of Promise API. SyncPromise executes your Promise based code synchronously.

Why

Because sometimes you need to test your Promise based code in a sync scenario.

Features

  • Small
  • ES6 based
  • With tests
  • Most of new Promise()
  • Most of Promise.prototype.then
  • Most of Promise.resolve
  • Most of Promise.reject
  • Most of Promise.all

Restrictions

Can't handle Promise.prototype.catch for obvious reasons.

Differences from ECMAScript promises

  • Throws when SyncPromise callback ends without resolving the promise
  • Throws when attempting to resolve an already resolved promise
  • No Promise.prototype.catch
  • No Promise.prototype.race (we accept patches!)
  • Some other things probably missing...
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago