chain-function

chain a bunch of functions together into a single call

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
chain-function
401.0.14 years ago7 years agoMinified + gzip package size for chain-function in KB

Readme

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"