UNPKG

bower

Version:

The browser package manager

18 lines (11 loc) 337 B
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;