@metreeca/core - v0.10.0
    Preparing search index...

    Function multiple

    • Reduces a Some value to the values it holds.

      Converts a flexible input into an array where the call site places no constraint on the number of values, stating an unbounded expectation in the same terms as required and optional.

      Type Parameters

      • T

        The type of the contained values

      Parameters

      • values: Some<T>

        The value to reduce: undefined, a single T, or a collection of T drawn from exactly once, so single-pass iterators are safe to pass

      Returns readonly T[]

      An array holding the given values: empty if values is undefined, a single-element array if values is a bare T, values itself if it is already an array, or its elements collected in iteration order otherwise