* Gets all but the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {Array} Returns the slice of `array`. * @example * * _.initial([1, 2, 3]); * // => [1, 2
(array)
| 7569 | * // => [1, 2] |
| 7570 | */ |
| 7571 | function initial(array) { |
| 7572 | var length = array == null ? 0 : array.length; |
| 7573 | return length ? baseSlice(array, 0, -1) : []; |
| 7574 | } |
| 7575 | |
| 7576 | /** |
| 7577 | * Creates an array of unique values that are included in all given arrays |
nothing calls this directly
no test coverage detected