JSPM

chain-function

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 509554
  • Score
    100M100P100Q172488F
  • License MIT

chain a bunch of functions together into a single call

Package Exports

  • chain-function

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chain-function) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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"