Takaro - v0.4.11
    Preparing search index...

    Function sampleSize

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

      Type Parameters

      • T

      Parameters

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

        The collection to sample.

      • Optionaln: number

        The number of elements to sample.

      Returns T[]

      Returns the random elements.

    • Type Parameters

      • T extends object

      Parameters

      • collection: T | null | undefined
      • Optionaln: number

      Returns T[keyof T][]

      _.sampleSize