Options
All
  • Public
  • Public/Protected
  • All
Menu

Module util

Index

Functions

_assertDefined

  • _assertDefined(value: any): void
  • Throws if value is not defined.

    Parameters

    • value: any

    Returns void

_sign

  • _sign(x: number): number
  • Returns -1 if x is negative (including -0); otherwise returns 1.

    Parameters

    • x: number

    Returns number

isSafeInteger

  • isSafeInteger(value: bigint): boolean
  • Indicates whether the provided bigint value is within the range[ Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER].

    Parameters

    • value: bigint

      The integer to test.

    Returns boolean

    True if toNumber(value) can be called without losing any precision.