1.2.15 • Published 10 months ago

every-async v1.2.15

Weekly downloads
1
License
MIT
Repository
github
Last release
10 months ago

every-async

Calls every callback and keeps calling while the return value is true.

var every = require('every-async');
var assert = require('assert');

function doSomething(callback) {
  callback(null, true)
}

function stopAfterThisOne(callback) {
  callback(null, true)
}

function neverReachHere(callback) {
  callback(null, true)
}

every([doSomething, stopAfterThisOne, neverReachHere], function(err, result) {
  assert.equal(result, false)
})

/* pass any number of arguments */

function doSomething2(arg1, arg2, callback) {
  callback(null, true)
}

function stopAfterThisOne2(arg1, arg2, callback) {
  callback(null, true)
}

function neverReachHere2(arg1, arg2, callback) {
  callback(null, true)
}

every([doSomething2, stopAfterThisOne2, neverReachHere2], 1, 2, function(err, result) {
  assert.equal(result, false)
})
1.2.13

10 months ago

1.2.14

10 months ago

1.2.15

10 months ago

1.2.12

10 months ago

1.2.11

10 months ago

1.2.10

10 months ago

1.2.8

11 months ago

1.2.7

11 months ago

1.2.6

11 months ago

1.2.9

11 months ago

1.2.4

3 years ago

1.2.3

6 years ago

1.2.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago