Every line of 'js array slice' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
130 slice: function slice(start, end) { 131 return fromList(this.constructor, $slice.call(validate(this), start, end)); 132 },
5 Array.slice = function slice(arr) { 6 return Array.prototype.slice.apply(arr, Array.prototype.slice.call(arguments, 1)); 7 };
10 $def($def.P + FORCED, ARRAY_BUFFER, {slice: function slice(start, end) { 11 var len = this.byteLength, 12 first = toIndex(start, len), 13 final = toIndex(end === undefined ? len : end, len), 14 result = new $ArrayBuffer(toLength(final - first)), 15 viewS = new $DataView(this), 16 viewT = new $DataView(result), 17 index = 0; 18 while (first < final) { 19 viewT.setUint8(index++, viewS.getUint8(first++)); 20 } 21 return result; 22 }});
13 slice: function slice(begin, end) { 14 var len = toLength(this.length); 15 var klass = cof(this); 16 end = end === undefined ? len : end; 17 if (klass == 'Array') return arraySlice.call(this, begin, end); 18 var start = toAbsoluteIndex(begin, len); 19 var upTo = toAbsoluteIndex(end, len); 20 var size = toLength(upTo - start); 21 var cloned = new Array(size); 22 var i = 0; 23 for (; i < size; i++) cloned[i] = klass == 'String' 24 ? this.charAt(start + i) 25 : this[start + i]; 26 return cloned; 27 }
29 module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) { 30 return Array.prototype.slice.call(list, fromIndex, toIndex); 31 }));
1181 function slice(arr, start, end) { 1182 return Array.prototype.slice.call(arr, start, end); 1183 }
639 Buffer.prototype.slice = function slice(start, end) { 640 var buffer = this.subarray(start, end); 641 Object.setPrototypeOf(buffer, Buffer.prototype); 642 return buffer; 643 };
219 function slice(arr: Array, start?: number, end?: number): Array { 220 return Array.prototype.slice.call(arr, start, end); 221 }
31 slice: function slice(start, end) { 32 if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix 33 var len = anObject(this).byteLength; 34 var first = toAbsoluteIndex(start, len); 35 var fin = toAbsoluteIndex(end === undefined ? len : end, len); 36 var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); 37 var viewS = new $DataView(this); 38 var viewT = new $DataView(result); 39 var index = 0; 40 while (first < fin) { 41 viewT.setUint8(index++, viewS.getUint8(first++)); 42 } return result; 43 }
66 function collection_slice(array,startIndex,endIndex){ 67 return collection__sliceFn.apply(startIndex,endIndex) 68 }