@newdash/newdash
Version:
javascript/typescript utility library
17 lines (16 loc) • 332 B
TypeScript
/**
* Gets all but the last element of `array`.
*
* @since 5.18.0
* @category Array
* @param array The array to query.
* @returns Returns the slice of `array`.
* @example
*
* ```ts
* initial([1, 2, 3])
* // => [1, 2]
* ```
*/
export declare function initial<T = any>(array: Array<T>): Array<T>;
export default initial;