Hierarchy

  • HelperUtils

Constructors

Methods

  • Assign value from source, if property is defined in init at same key, and when the types correspond. Otherwise init data prop stays untouched. It isnt possible to set any prop undefined that is defined by init obj. Recurses on nested objects. These only get recursed/overriden when the source also has them obviously. Optionally: Overrides top-level init null-values with any object from source. Otherwise null-refs count as undefined. Using that option will remove type-safety as being leveraged, since the override value may or may not comply to what was specified by the initTyped object/interface declaration.

    Type Parameters

    • O extends object

    Parameters

    • initTyped: O
    • sourceData: any
    • Optional overrideNullRefs: boolean

    Returns void

  • Type Parameters

    • T

    Parameters

    • obj: T

    Returns T

  • Calculates the base of an exponential function given a range and number of steps.

    Parameters

    • sideA: number

      Beginning of the range

    • sideB: number

      End of the range

    • steps: number

      Number of steps to

    Returns number

    Base of the exponential function

  • Filter any input by mask object (recurses), results in mask return type. Input & Mask do not get mutated (output is clone of mask).

    Type Parameters

    • T extends object

    Parameters

    • input: object
    • mask: T
    • Optional overrideNullRefs: boolean

    Returns T

  • Parameters

    • min: number

      Lower bound (inclusively)

    • max: number

      Upper bound (exclusively)

    Returns number

    A random integer number between min and max

  • Parameters

    • val: unknown

    Returns val is boolean

  • Parameters

    • val: unknown

    Returns boolean

  • Parameters

    • obj: object

    Returns boolean

  • Parameters

    • val: unknown

    Returns boolean

  • Parameters

    • val: unknown

    Returns val is object

  • Parameters

    • val: unknown

    Returns val is string

  • Parameters

    • val: unknown

    Returns val is undefined

  • Parameters

    • rateKbps: number

    Returns number

    Bps (bits per second)

  • Type Parameters

    • T

    Parameters

    • array: T[]
    • iteratee: ((o) => number)
        • (o): number
        • Parameters

          • o: T

          Returns number

    Returns undefined | T

  • Parameters

    • rateMbps: number

    Returns number

    Bps (bits per second)

  • Type Parameters

    • T

    Parameters

    • array: T[]
    • iteratee: ((o) => number)
        • (o): number
        • Parameters

          • o: T

          Returns number

    Returns number

  • Type Parameters

    • T

    Parameters

    • array: T[]
    • iteratee: ((o) => number)
        • (o): number
        • Parameters

          • o: T

          Returns number

    Returns undefined | T

  • Parameters

    • millis: number

    Returns number

  • Returns undefined

  • Parameters

    • val: unknown

    Returns 0 | 1

    0 only for values strict equal 0, and 1 for everything else (also non-number values).

  • Parameters

    • val: any
    • negative: boolean = false

    Returns number

  • Type Parameters

    • T

    Parameters

    • Optional val: T

    Returns null | T

  • Parameters

    • val: any

    Returns number

  • Parameters

    • obj: unknown

    Returns string

  • Parameters

    • inUrl: string

    Returns string

  • Parameters

    • inUrl: string

    Returns string

  • Number.toFixed returns a string, using this func avoids parsing back to number.

    Parameters

    • num: number
    • digits: number = 0

    Returns number

  • Parameters

    • ms: number

    Returns Promise<unknown>

Generated using TypeDoc