Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/splitEvery

Index

References

Functions

References

Renames and re-exports splitEvery

Functions

  • splitEvery(a: number, list: string): string[]
  • splitEvery<T>(a: number, list: ArrayLike<T>): T[][]
  • splitEvery(a: number): { (list: string): string[]; <T>(list: ArrayLike<T>): T[][] }
  • Splits a collection into slices of the specified length

    example
     splitEvery(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [3, 4], [5]]
    

    Parameters

    • a: number
    • list: string

    Returns string[]

  • Splits a collection into slices of the specified length

    example
     splitEvery(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [3, 4], [5]]
    

    Type parameters

    • T

    Parameters

    • a: number
    • list: ArrayLike<T>

    Returns T[][]

  • Splits a collection into slices of the specified length

    example
     splitEvery(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [3, 4], [5]]
    

    Parameters

    • a: number

    Returns { (list: string): string[]; <T>(list: ArrayLike<T>): T[][] }

      • (list: string): string[]
      • <T>(list: ArrayLike<T>): T[][]
      • Parameters

        • list: string

        Returns string[]

      • Type parameters

        • T

        Parameters

        • list: ArrayLike<T>

        Returns T[][]

Generated using TypeDoc