@s-libs/micro-dash
    Preparing search index...

    Function sampleSize

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

      Differences from lodash:

      • no special treatment given to fraction values of n

      Contribution to minified bundle size, when it is the only function imported:

      • Lodash: 5,786 bytes
      • Micro-dash: 826 bytes

      Type Parameters

      • T

      Parameters

      • array: Nil | readonly T[]
      • Optionaln: number

      Returns T[]

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

      Differences from lodash:

      • no special treatment given to fraction values of n

      Contribution to minified bundle size, when it is the only function imported:

      • Lodash: 5,786 bytes
      • Micro-dash: 826 bytes

      Type Parameters

      • T

      Parameters

      • object: Nil | T
      • Optionaln: number

      Returns T[keyof T][]