call-all-fns
Wrap a set of functions in a single function that calls each
Last updated 3 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install call-all-fns 
SYNC missed versions from official npm registry.

call-all-fns Build Status

Wrap a set of functions in a single function that calls each

Install

$ npm install --save call-all-fns

Usage

var callAll = require('call-all-fns')

var all = callAll([
  function (value) {
    return value + 1
  },
  function (value) {
    return value + 2
  } 
])
all(1)
//=> [2, 3]

API

callAll(fns) -> function

Returns a function that will pass all arguments to the fns and then return an array of results.

fns

Required
Type: array[function] / functions...

An array of functions. Functions can also be provided as a variadic set of arguments.

License

MIT © Ben Drucker

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |