bound-compose
Create a bound composed function. using the redux#compose .
npm i bound-compose
Usage
let result;
result = doSomething1(result, ...args)
result = doSomething2(result, ...args)
result = doSomething3(result, ...args)
result = doSomething3(doSomething2(doSomething1(result, ...args), ...args), ...args)
const result = boundCompose(doSomething3, doSomething2, doSomething1)(arg)(...args)
const result = boundCompose.left(doSomething1, doSomething2, doSomething3)(arg)(...args)
Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
License
MIT
© sugarshin