MCPcopy Index your code
hub / github.com/deployd/deployd / drop

Function drop

test-app/public/sinon.js:17674–17681  ·  view source on GitHub ↗

* Creates a slice of `array` with `n` elements dropped from the beginning. * * @static * @memberOf _ * @since 0.5.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to drop.

(array, n, guard)

Source from the content-addressed store, hash-verified

17672 * // => [1, 2, 3]
17673 */
17674 function drop(array, n, guard) {
17675 var length = array == null ? 0 : array.length;
17676 if (!length) {
17677 return [];
17678 }
17679 n = (guard || n === undefined) ? 1 : toInteger(n);
17680 return baseSlice(array, n < 0 ? 0 : n, length);
17681 }
17682
17683 /**
17684 * Creates a slice of `array` with `n` elements dropped from the end.

Callers

nothing calls this directly

Calls 2

toIntegerFunction · 0.85
baseSliceFunction · 0.85

Tested by

no test coverage detected