package.modules.delay.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of underscore Show documentation
Show all versions of underscore Show documentation
JavaScript's functional programming helper library.
The newest version!
import restArguments from './restArguments.js';
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
export default restArguments(function(func, wait, args) {
return setTimeout(function() {
return func.apply(null, args);
}, wait);
});