Recall Action
Subscribable function
Installation
> npm install recall-action
Usage
// create actionconst action = // any function passed to action as a first argument becomes a listener, returns object with done method to cancel subscriptionconst listener1 = // any action call with typeof !== 'fucntion' first argument will recall every listener with returned value passed as a first argument//> listener1 logs 5 const listener2 = //> listener1 logs javascript//> listener2 logs javascript // call done method to remove listener from actionlistener1 //> listener2 logslistener2