2.0.0 • Published 10 years ago

acc v2.0.0

Weekly downloads
12
License
MIT
Repository
github
Last release
10 years ago

acc

Build Status js-standard-style stable

A more generic version of after function that accumulates arguments (including errors) from previous invocations.

Usage

  var acc = require('acc')

  var fn = acc(2, function (a, b, c) {
    // This function is being invoked after two calls of fn()
    // arguments #=> [[1, 2], [2, 3], [3, 4]]
    console.log('1, 2: ', a[0], a[1])
    console.log('2, 3: ', b[0], b[1])
    console.log('3, 4: ', c[0], c[1])
  })

  fn(1, 2, 3)
  fn(2, 3, 4)

Install

Via npm:

npm i acc

License

See LICENSE file.

2.0.0

10 years ago

1.0.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago