2 * The base implementation of `_.slice` without an iteratee call guard.
5 * @param {Array} array The array to slice.
6 * @param {number} [start=0] The start position.
7 * @param {number} [end=array.length] The end position.
8 * @returns {Array} Returns the slice of `array`.
10 function baseSlice(array, start, end) {
12 length = array.length;
15 start = -start > length ? 0 : (length + start);
17 end = end > length ? length : end;
21 length = start > end ? 0 : ((end - start) >>> 0);
24 var result = Array(length);
25 while (++index < length) {
26 result[index] = array[index + start];
31 module.exports = baseSlice;