slice.js 234 B

1234567891011
  1. 'use strict';
  2. module.exports = function slice(remove, limit) {
  3. var collection = this.items.slice(remove);
  4. if (limit !== undefined) {
  5. collection = collection.slice(0, limit);
  6. }
  7. return new this.constructor(collection);
  8. };