github petkaantonov/bluebird v2.0.0

latest releases: v3.7.2, v3.7.1, v3.7.0...
9 years ago

#What's new in 2.0

  • Resource management - never leak resources again
  • Promisification on steroids - entire modules can now be promisified with one line of code
  • .map(), .each(), .filter(), .reduce() reimagined from simple sugar to powerful concurrency coordination tools
  • API Documentation has been reorganized and more elaborate examples added
  • Deprecated progression and deferreds
  • Improved performance and readability

Features:

  • Added using() and disposer()
  • .map() now calls the handler as soon as items in the input array become fulfilled
  • Added a concurrency option to .map()
  • .filter() now calls the handler as soon as items in the input array become fulfilled
  • Added a concurrency option to .filter()
  • .reduce() now calls the handler as soon as items in the input array become fulfilled, but in-order
  • Added .each()
  • Promise.resolve() behaves like Promise.cast. Promise.cast deprecated.
  • Synchronous inspection: Removed .inspect(), added .value() and .reason()
  • Promise.join() now takes a function as the last argument
  • Added Promise.setScheduler()
  • .cancel() supports a custom cancellation reason
  • .timeout() now cancels the promise instead of rejecting it
  • .nodeify() now supports passing multiple success results when mapping promises to nodebacks
  • Added suffix and filter options to Promise.promisifyAll()

Breaking changes:

  • Sparse array holes are not skipped by collection methods but treated as existing elements with undefined value
  • .map() and .filter() do not call the given mapper or filterer function in any specific order
  • Removed the .inspect() method
  • Yielding an array from a coroutine is not supported by default. You can use coroutine.addYieldHandler() to configure the old behavior (or any behavior you want).
  • .any() and .some() no longer use an array as the rejection reason. AggregateError is used instead.

Don't miss a new bluebird release

NewReleases is sending notifications on new releases.