Options
All
  • Public
  • Public/Protected
  • All
Menu

Module initial

Index

References

Functions Array

References

Renames and re-exports __type

Array Functions

  • initial<T>(array: T[]): T[]
  • Gets all but the last element of array.

    since

    5.18.0

    example
    initial([1, 2, 3])
    // => [1, 2]

    Type parameters

    • T = any

    Parameters

    • array: T[]

      The array to query.

    Returns T[]

    Returns the slice of array.