- 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.