Files
NapCatQQ/.pnpm-store/v3/files/a7/856ece105fc82ff98b7697c68e343a534d6462f9cc1bfead2c04659f52ab21b011712e5364611a293ec368fb41452b9147034e5af8941a23098e650f3f84cb
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

23 lines
459 B
Plaintext

import baseSlice from './_baseSlice.js';
/**
* 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]
*/
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
export default initial;