Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/init

Index

References

Functions

References

Renames and re-exports init

Functions

  • init(list: string): string
  • init<T>(list: ArrayLike<T>): T[]
  • Returns all but the last element of the given list or string.

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

    Parameters

    • list: string

    Returns string

  • Returns all but the last element of the given list or string.

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

    Type parameters

    • T

    Parameters

    • list: ArrayLike<T>

    Returns T[]

Generated using TypeDoc