How to use the nextTick function from async

Find comprehensive JavaScript async.nextTick code examples handpicked from public code repositorys.

4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
* @param {...*} args... - any number of additional arguments to pass to the
* callback on the next tick.
* @example
*
* var call_order = [];
* async.nextTick(function() {
*     call_order.push('two');
*     // call_order now equals ['one','two']
* });
* call_order.push('one');
fork icon0
star icon2
watch icon1

1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
	async.nextTick = process.nextTick;
} else {
	async.nextTick = _delay;
}

async.setImmediate = _setImmediate ? _delay : async.nextTick;

async.forEach = async.each = function (arr, iterator, callback) {
	return async.eachOf(arr, _withoutIndex(iterator), callback);
};
fork icon0
star icon0
watch icon2

+ 14 other calls in file