ixfx
    Preparing search index...

    Function pairwise

    • Yields pairs made up of overlapping items from the input array.

      Throws an error if there are less than two entries.

      pairwise([1, 2, 3, 4, 5]);
      Yields:
      [ [1,2], [2,3], [3,4], [4,5] ]

      Type Parameters

      • T

      Parameters

      • values: T[]

      Returns Generator<T[], void, unknown>