You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 340 B

3 years ago
12345678910111213141516171819202122232425
  1. # chain-function
  2. chain a bunch of functions
  3. ```sh
  4. npm i chain-function
  5. ```
  6. ```js
  7. function foo() {
  8. console.log('foo')
  9. }
  10. function baz() {
  11. console.log('bar')
  12. }
  13. var foobar = chain(foo, bar)
  14. foobar() // "bar" "foo"
  15. //handles empty values just fine
  16. foobar = chain(foo, null, bar, undefined)
  17. foobar() // "bar" "foo"
  18. ```