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.

setImmediate.js 687B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. /* istanbul ignore file */
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports.fallback = fallback;
  7. exports.wrap = wrap;
  8. var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
  9. var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
  10. function fallback(fn) {
  11. setTimeout(fn, 0);
  12. }
  13. function wrap(defer) {
  14. return (fn, ...args) => defer(() => fn(...args));
  15. }
  16. var _defer;
  17. if (hasSetImmediate) {
  18. _defer = setImmediate;
  19. } else if (hasNextTick) {
  20. _defer = process.nextTick;
  21. } else {
  22. _defer = fallback;
  23. }
  24. exports.default = wrap(_defer);