chain a bunch of functions
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitattributes
.gitignore
LICENSE.md
README.md
index.js
package.json
test.js

README.md

chain-function

chain a bunch of functions

npm i chain-function
 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"