No Description

delay.js 300B

123456789
  1. import restArguments from './restArguments.js';
  2. // Delays a function for the given number of milliseconds, and then calls
  3. // it with the arguments supplied.
  4. export default restArguments(function(func, wait, args) {
  5. return setTimeout(function() {
  6. return func.apply(null, args);
  7. }, wait);
  8. });