Bitbybit Docs
    Preparing search index...

    Class RandomThresholdDto<T> (Inputs.Lists)

    A list and a probability for lists.randomGetThreshold and lists.randomRemoveThreshold.

    Type Parameters

    • T
    Index

    Constructors

    Properties

    Constructors

    • Type Parameters

      • T

      Parameters

      • Optionallist: T[]
      • Optionalthreshold: number
      • Optionalclone: boolean

      Returns RandomThresholdDto<T>

    Properties

    list: T[]

    The list to pick from.

    undefined
    
    threshold: number

    The probability, from 0 to 1, that any one item is kept by the get method or dropped by the remove method.

    0.5
    

    0

    1

    0.1

    clone?: boolean

    When true, the list is deep-copied first so the input is never changed.

    true