Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

123456789101112131415161718
  1. var baseSlice = require('./_baseSlice');
  2. /**
  3. * Casts `array` to a slice if it's needed.
  4. *
  5. * @private
  6. * @param {Array} array The array to inspect.
  7. * @param {number} start The start position.
  8. * @param {number} [end=array.length] The end position.
  9. * @returns {Array} Returns the cast slice.
  10. */
  11. function castSlice(array, start, end) {
  12. var length = array.length;
  13. end = end === undefined ? length : end;
  14. return (!start && end >= length) ? array : baseSlice(array, start, end);
  15. }
  16. module.exports = castSlice;