No Description

delay.js 325B

1234567891011
  1. var restArguments = require('./restArguments.js');
  2. // Delays a function for the given number of milliseconds, and then calls
  3. // it with the arguments supplied.
  4. var delay = restArguments(function(func, wait, args) {
  5. return setTimeout(function() {
  6. return func.apply(null, args);
  7. }, wait);
  8. });
  9. module.exports = delay;