Ohm-Management - Projektarbeit B-ME
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.

12345678910111213141516171819202122232425262728
  1. var baseDelay = require('./_baseDelay'),
  2. baseRest = require('./_baseRest'),
  3. toNumber = require('./toNumber');
  4. /**
  5. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  6. * provided to `func` when it's invoked.
  7. *
  8. * @static
  9. * @memberOf _
  10. * @since 0.1.0
  11. * @category Function
  12. * @param {Function} func The function to delay.
  13. * @param {number} wait The number of milliseconds to delay invocation.
  14. * @param {...*} [args] The arguments to invoke `func` with.
  15. * @returns {number} Returns the timer id.
  16. * @example
  17. *
  18. * _.delay(function(text) {
  19. * console.log(text);
  20. * }, 1000, 'later');
  21. * // => Logs 'later' after one second.
  22. */
  23. var delay = baseRest(function(func, wait, args) {
  24. return baseDelay(func, toNumber(wait) || 0, args);
  25. });
  26. module.exports = delay;