1.2.15 • Published 6 months ago

every-async v1.2.15

Weekly downloads
1
License
MIT
Repository
github
Last release
6 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

6 months ago

1.2.14

6 months ago

1.2.15

6 months ago

1.2.12

6 months ago

1.2.11

6 months ago

1.2.10

6 months ago

1.2.8

6 months ago

1.2.7

6 months ago

1.2.6

6 months ago

1.2.9

6 months ago

1.2.4

3 years ago

1.2.3

5 years ago

1.2.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago