Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nextTick.js 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. 'use strict';
  2. /* istanbul ignore file */
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. var _setImmediate = require('./internal/setImmediate');
  7. /**
  8. * Calls `callback` on a later loop around the event loop. In Node.js this just
  9. * calls `process.nextTick`. In the browser it will use `setImmediate` if
  10. * available, otherwise `setTimeout(callback, 0)`, which means other higher
  11. * priority events may precede the execution of `callback`.
  12. *
  13. * This is used internally for browser-compatibility purposes.
  14. *
  15. * @name nextTick
  16. * @static
  17. * @memberOf module:Utils
  18. * @method
  19. * @see [async.setImmediate]{@link module:Utils.setImmediate}
  20. * @category Util
  21. * @param {Function} callback - The function to call on a later loop around
  22. * the event loop. Invoked with (args...).
  23. * @param {...*} args... - any number of additional arguments to pass to the
  24. * callback on the next tick.
  25. * @example
  26. *
  27. * var call_order = [];
  28. * async.nextTick(function() {
  29. * call_order.push('two');
  30. * // call_order now equals ['one','two']
  31. * });
  32. * call_order.push('one');
  33. *
  34. * async.setImmediate(function (a, b, c) {
  35. * // a, b, and c equal 1, 2, and 3
  36. * }, 1, 2, 3);
  37. */
  38. var _defer;
  39. if (_setImmediate.hasNextTick) {
  40. _defer = process.nextTick;
  41. } else if (_setImmediate.hasSetImmediate) {
  42. _defer = setImmediate;
  43. } else {
  44. _defer = _setImmediate.fallback;
  45. }
  46. exports.default = (0, _setImmediate.wrap)(_defer);
  47. module.exports = exports['default'];