2 * lodash 4.0.0 (Custom Build) <https://lodash.com/>
3 * Build: `lodash modularize exports="npm" -o ./`
4 * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
5 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
6 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7 * Available under MIT license <https://lodash.com/license>
11 * The base implementation of `_.slice` without an iteratee call guard.
14 * @param {Array} array The array to slice.
15 * @param {number} [start=0] The start position.
16 * @param {number} [end=array.length] The end position.
17 * @returns {Array} Returns the slice of `array`.
19 function baseSlice(array, start, end) {
21 length = array.length;
24 start = -start > length ? 0 : (length + start);
26 end = end > length ? length : end;
30 length = start > end ? 0 : ((end - start) >>> 0);
33 var result = Array(length);
34 while (++index < length) {
35 result[index] = array[index + start];
40 module.exports = baseSlice;