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

Function initial

lib/web/jshint.js:6543–6545  ·  view source on GitHub ↗

* Gets all but the last element of `array`. * * @static * @memberOf _ * @category Array * @param {Array} array The array to query. * @returns {Array} Returns the slice of `array`. * @example * * _.initial([1, 2, 3]); * // => [1, 2]

(array)

Source from the content-addressed store, hash-verified

6541 * // => [1, 2]
6542 */
6543 function initial(array) {
6544 return dropRight(array, 1);
6545 }
6546
6547 /**
6548 * Creates an array of unique values in all provided arrays using `SameValueZero`

Callers 1

PerThreadClass · 0.85

Calls 1

dropRightFunction · 0.85

Tested by

no test coverage detected