Compose two or more functions together.
If you aren't familiar with function composition you can read all about it here.
$ npm install @structs/compose
var times2plus1 = compose(plus1, times2)
// times2plus1(3) -> 7
function plus1 (x) {
return x + 1
}
function times2 (x) {
return x * 2
}
Documentation is available here.
$ npm test