MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / drop

Function drop

lib/web/jshint.js:6116–6125  ·  view source on GitHub ↗

* Creates a slice of `array` with `n` elements dropped from the beginning. * * @static * @memberOf _ * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to drop. * @param- {Object} [guard] Enables use as a cal

(array, n, guard)

Source from the content-addressed store, hash-verified

6114 * // => [1, 2, 3]
6115 */
6116 function drop(array, n, guard) {
6117 var length = array ? array.length : 0;
6118 if (!length) {
6119 return [];
6120 }
6121 if (guard ? isIterateeCall(array, n, guard) : n == null) {
6122 n = 1;
6123 }
6124 return baseSlice(array, n < 0 ? 0 : n);
6125 }
6126
6127 /**
6128 * Creates a slice of `array` with `n` elements dropped from the end.

Callers 1

restFunction · 0.85

Calls 2

isIterateeCallFunction · 0.85
baseSliceFunction · 0.85

Tested by

no test coverage detected