Repository  -  API  -  Source


January 6, 2018
  • Allow functions created by Promise.async to accept legacy node-style callback arguments.
  • Switch to eslint, update mocha, and ensure we test up to node 9.


May 5, 2016
  • Add a cache to ensure that only a single prfun Promise class is constructed even when using the wrapper interface.
  • Update npm dev dependencies.


December 11, 2015
  • Optimize the Promise subclass constructor to avoid costly overhead in ES5 environments. The slow ES6 path is only used if necessary for correctness (or if the native Promise implementation uses ES6 class syntax).
  • Added Promise#then0 to the API, which is a shim when a native Promise#then0 is not available. Some Promise implementations provide this method, which is much more efficient than calling Promise#then and discarding the result.
  • Used Promise#then0 in internal implementations where appropriate, including Promise.async (where the use of generators can now yield better performance than chaining promises in the usual way).


November 20, 2015
  • Ensure that Promise.async always returns a Promise. (Previously if the function returned immediately without yielding the result would not be wrapped in a promise.)


April 28, 2014
  • Improve compatibilty with environments missing a definition of Object.setPrototypeOf.


April 27, 2015
  • Switch from es6-shim to core-js by default.
  • Fix our subclass code to follow the latest ES6 specification.
  • Work around some bugs in native Promise implementations to allow prfun to use native promises.


April 23, 2015
  • Breaking change: prfun now creates a subclass of Promise by default, instead of smashing the global Promise. This only works if your Promise implementation properly supports the ES6 subclass semantics -- es6-shim is known to implement the ES6 spec properly. To smash the global Promise like in the bad old days, use require('prfun/smash').


November 6, 2014
  • Fix potential resource leak in Promise#timeout.


September 25, 2014
  • Added Promise#tap, Promise#filter.
  • Bug fix to promisify with named arguments (an array of names as second parameter).


July 15, 2014
  • Breaking change to promisify API: following the lead of denodeify in rsvp and q version 2, the promisify function has been changed to eliminate the magic variadic argument inference. The promisify function now takes an explicit second parameter, names. If the names parameter is missing or falsy, then a single argument is used to resolve the promise. If the names parameter is true, then the promise is resolved with an array of the variadic arguments to the callback. If the names parameter is an array, the array names the variadic arguments, and the promise is resolved with an object containing fields with those names.

See comments on bower's issue #1403 and this commit on q's v2 branch for more details.


March 30, 2014
  • Initial release.