• Gets n random elements at unique keys from collection up to the size of collection.

    Type Parameters

    • T

    Parameters

    • collection: undefined | null | Dictionary<T> | NumericDictionary<T>

      The collection to sample.

    • Optional n: number

      The number of elements to sample.

    Returns T[]

    Returns the random elements.

  • Type Parameters

    • T extends object

    Parameters

    • collection: undefined | null | T
    • Optional n: number

    Returns T[keyof T][]

    See

    _.sampleSize

Generated using TypeDoc