Skip to content

v1.0.3

Latest
Compare
Choose a tag to compare
@jankuca jankuca released this 22 Feb 15:25
· 11 commits to master since this release
  • Added Publisher#then() and Publisher#catch() making Publisher a thenable thus making it possible to use actions as a promises.
var action = fluo.createAction({ asyncResult: true });
action.then(function (result) { console.log('resolved: ' + result); });

action.listen(function () {
  action.completed('xyz'); // logs 'resolved: xyz'
});

action();
  • Renamed Publisher#promise() to Publisher#resolve() and added Publisher#reject() which are aliases for triggering the completed and failed child actions.
  • Cleaner npm package.