Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Util

Hierarchy

  • Util

Index

Methods

Static arrayRemoveValue

  • arrayRemoveValue(arr: any[], value: any): any[]
  • Parameters

    • arr: any[]
    • value: any

    Returns any[]

Static arraySetUnique

  • arraySetUnique(arr: any): any[]
  • Parameters

    • arr: any

    Returns any[]

Static castToType

  • castToType(o: any): any
  • Parameters

    • o: any

    Returns any

Static copy

  • copy(obj: any): any
  • Parameters

    • obj: any

    Returns any

Static fetchJson

  • fetchJson(url: string): Promise<any>
  • Parameters

    • url: string

    Returns Promise<any>

Static getGlobal

  • getGlobal(): Window | Global
  • Returns the global object of the environment the application is running in (browser, node, web worker, or frame)

    Returns Window | Global

Static getTimeStamp

  • getTimeStamp(date?: any): number
  • Returns the current date as milliseconds since midnight Jan 1, 1970.

    Parameters

    • Default value date: any = null

    Returns number

Static getUUID

  • getUUID(): string
  • Returns a UUID.

    Returns string

Static getUnixTimeStamp

  • getUnixTimeStamp(date?: any): number
  • Returns the current date as seconds since midnight Jan 1, 1970.

    Parameters

    • Default value date: any = null

    Returns number

Static isBrowser

  • isBrowser(): boolean
  • Checks if the application is running in a browser.

    Returns boolean

Static isOnline

  • isOnline(): boolean
  • Checks if the application is running in a browser and online.

    Returns boolean

Static test

  • test(): void
  • Returns void

Static tryParseJSON

  • tryParseJSON(jsonString: any): any
  • Parameters

    • jsonString: any

    Returns any