Chaino 🔗
Library to create chainable functions.
Installation
npm install chaino --save-dev # npm yarn add chaino --save-dev # yarn
Usage
Define your library as chainable list of functions by providing the keys.
NOTE: Passing non-function keys is fine, but trying to call them will just return the property name.
// chainable-lib.jsconst chaino = ; const keys = ` red()` ` blue()` ` yellow()` moduleexports = ;
Then your library can be used as:
// index.jsconst library = ; library; // red(abc)libraryred // red blue(abc)libraryblueyellow // blue,yellow red(abc)
More examples available here. Initial motivation here.
License
MIT