callback-chain
A tool collecting callbacks and invoking them on demand in a sequence, passing a set of user provided arguments. It implements the linked list without using any data structure, but rather keeps provided callbacks in the correct order using the javascript closure feature. Detailed description could be found in the concept section of the docs.
Installation
yarn add callback-chain
Basic Usage
; const chain = ; chain;chain; chain ;
Output:
Run 1. Consumed "the value"
Run 2. Consumed "another value" and removed the callback
Run 2. Consumed "another value"
Run 3. Consumed "yet another value"
Docs
Check out the docs for more details.