1234567891011121314151617 |
- var slice = require('../array/slice');
- /**
- * Delays the call of a function within a given context.
- */
- function timeout(fn, millis, context){
- var args = slice(arguments, 3);
- return setTimeout(function() {
- fn.apply(context, args);
- }, millis);
- }
- module.exports = timeout;
|