rest.js 332 B

12345678910
  1. var _setup = require('./_setup.js');
  2. // Returns everything but the first entry of the `array`. Especially useful on
  3. // the `arguments` object. Passing an **n** will return the rest N values in the
  4. // `array`.
  5. function rest(array, n, guard) {
  6. return _setup.slice.call(array, n == null || guard ? 1 : n);
  7. }
  8. module.exports = rest;