Files
30-seconds-of-code/node_modules/chain-function/README.md
2019-08-20 15:52:05 +02:00

26 lines
340 B
Markdown

# chain-function
chain a bunch of functions
```sh
npm i chain-function
```
```js
function foo() {
console.log('foo')
}
function baz() {
console.log('bar')
}
var foobar = chain(foo, bar)
foobar() // "bar" "foo"
//handles empty values just fine
foobar = chain(foo, null, bar, undefined)
foobar() // "bar" "foo"
```