* Slices the `collection` from the `start` index up to, but not including, * the `end` index. * * Note: This function is used instead of `Array#slice` to support node lists * in IE < 9 and to ensure dense arrays are returned. * * @private * @param {Array|Object|string} collectio
(array, start, end)
| 35538 | * @returns {Array} Returns the new array. |
| 35539 | */ |
| 35540 | function slice(array, start, end) { |
| 35541 | start || (start = 0); |
| 35542 | if (typeof end == 'undefined') { |
| 35543 | end = array ? array.length : 0; |
| 35544 | } |
| 35545 | var index = -1, |
| 35546 | length = end - start || 0, |
| 35547 | result = Array(length < 0 ? 0 : length); |
| 35548 | |
| 35549 | while (++index < length) { |
| 35550 | result[index] = array[start + index]; |
| 35551 | } |
| 35552 | return result; |
| 35553 | } |
| 35554 | |
| 35555 | /*--------------------------------------------------------------------------*/ |
| 35556 |
no outgoing calls
no test coverage detected