basant307/AI_Governance_Project
045
1'use strict';2 3Object.defineProperty(exports, "__esModule", {4 value: true5});6 7var _setImmediate = require('./internal/setImmediate.js');8 9/**10 * Calls `callback` on a later loop around the event loop. In Node.js this just11 * calls `process.nextTick`. In the browser it will use `setImmediate` if12 * available, otherwise `setTimeout(callback, 0)`, which means other higher13 * priority events may precede the execution of `callback`.14 *15 * This is used internally for browser-compatibility purposes.16 *17 * @name nextTick18 * @static19 * @memberOf module:Utils20 * @method21 * @see [async.setImmediate]{@link module:Utils.setImmediate}22 * @category Util23 * @param {Function} callback - The function to call on a later loop around24 * the event loop. Invoked with (args...).25 * @param {...*} args... - any number of additional arguments to pass to the26 * callback on the next tick.27 * @example28 *29 * var call_order = [];30 * async.nextTick(function() {31 * call_order.push('two');32 * // call_order now equals ['one','two']33 * });34 * call_order.push('one');35 *36 * async.setImmediate(function (a, b, c) {37 * // a, b, and c equal 1, 2, and 338 * }, 1, 2, 3);39 */40var _defer; /* istanbul ignore file */41 42 43if (_setImmediate.hasNextTick) {44 _defer = process.nextTick;45} else if (_setImmediate.hasSetImmediate) {46 _defer = setImmediate;47} else {48 _defer = _setImmediate.fallback;49}50 51exports.default = (0, _setImmediate.wrap)(_defer);52module.exports = exports.default;