@eagleoutice/flowr - v2.10.2
    Preparing search index...

    Function getUniqueCombinationsOfSize

    • Generate all unique combinations of the array with the given size. In other words, given [a,b,c], as well as minSize=2 and maxSize=2, this will generate [a,b], [a,c] and [b,c], but not, e.g., [a,a] or [b,a].

      If minSize!=maxSize, the result is guaranteed to be sorted by size.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The array to generate combinations from

      • minSize: number = 0

        The inclusive minimum size of the combinations, must be at least 0 and at most maxSize

      • maxSize: number = array.length

        The inclusive maximum size of the combinations, must be at least minSize and at most array.length

      Returns Generator<T[], void, void>