00001 var baseRest = require('./_baseRest'), 00002 toInteger = require('./toInteger'); 00003 00005 var FUNC_ERROR_TEXT = 'Expected a function'; 00006 00032 function rest(func, start) { 00033 if (typeof func != 'function') { 00034 throw new TypeError(FUNC_ERROR_TEXT); 00035 } 00036 start = start === undefined ? start : toInteger(start); 00037 return baseRest(func, start); 00038 } 00039 00040 module.exports = rest;