Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/utils"

Index

Variables

RESOURCE_PREFIX

RESOURCE_PREFIX: string

Functions

GC

  • GC(): any
  • An utility function that invokes garbage collection on the JavaScript side.

    Returns any

convertString

  • convertString(value: any): any
  • Converts string value to number or boolean.

    Parameters

    • value: any

      The original value.

    Returns any

copyFrom

  • copyFrom(source: any, target: any): any
  • An utility function that copies properties from source object to target object.

    Parameters

    • source: any

      The source object.

    • target: any

      The target object.

    Returns any

escapeRegexSymbols

  • escapeRegexSymbols(source: string): string
  • Escapes special regex symbols (., *, ^, $ and so on) in string in order to create a valid regex from it.

    Parameters

    • source: string

      The original value.

    Returns string

isDataURI

  • isDataURI(uri: string): boolean

isFileOrResourcePath

  • isFileOrResourcePath(path: string): boolean
  • Returns true if the specified path points to a resource or local file.

    Parameters

    • path: string

      The path.

    Returns boolean

mergeSort

  • mergeSort(arr: Array<any>, compareFunc: function): Array<any>
  • Sorts an array by using merge sort algoritm (which ensures stable sort since the built-in Array.sort() does not promise a stable sort).

    Parameters

    • arr: Array<any>

      array to be sorted

    • compareFunc: function

      function that will be used to compare two elements of the array

        • (a: any, b: any): number
        • Parameters

          • a: any
          • b: any

          Returns number

    Returns Array<any>

openUrl

  • openUrl(url: string): boolean

parseJSON

  • parseJSON(source: string): any
  • Returns object from JSON or JSONP string.

    Parameters

    • source: string

      The JSON or JSONP string.

    Returns any

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method