]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/index.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npmlog / node_modules / gauge / node_modules / lodash._baseslice / index.js
1 /**
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>
8  */
9
10 /**
11  * The base implementation of `_.slice` without an iteratee call guard.
12  *
13  * @private
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`.
18  */
19 function baseSlice(array, start, end) {
20   var index = -1,
21       length = array.length;
22
23   if (start < 0) {
24     start = -start > length ? 0 : (length + start);
25   }
26   end = end > length ? length : end;
27   if (end < 0) {
28     end += length;
29   }
30   length = start > end ? 0 : ((end - start) >>> 0);
31   start >>>= 0;
32
33   var result = Array(length);
34   while (++index < length) {
35     result[index] = array[index + start];
36   }
37   return result;
38 }
39
40 module.exports = baseSlice;