Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "common-utils/common-misc-utils"

Index

Functions

copyObject

  • copyObject(obj: any): object
  • Parameters

    • obj: any

    Returns object

    • [index: number]: any

dumpObj

  • Prints given object properties to string.

    Parameters

    • obj: any

      Object which properties to print.

    • propPaths: Array<string | PathsForDump>

      Names for properties to print.

    • dstArr: string[]

      Destination array to place strings to.

    • errMode: dumpObjErrMode

    Returns string[]

Const getDebugMode

  • getDebugMode(): boolean
  • Returns boolean

invertMapObj

  • invertMapObj(map: CUMap): object
  • Inverted object {'key': 'value'} -> {'value': 'key'}

    Parameters

    Returns object

    • inverted maps. { invertedMapFirst, - object where for not unique values of input object, only first key will be used as a value. invertedMapAll, object where for not unique values of input object, all keys, separated by comma, will be used as a value. }

mergeOptions

  • mergeOptions(src: any, def: any): any
  • Merges src options with default ones.

    throws
    • exception if there are options which are not presented in default options. Note: this means that default options must contain all possible options.

    Parameters

    • src: any
    • def: any

      factory for default object. Arrays are not supportetd.

    Returns any

    • object with merged options.

Const optsToJson

  • optsToJson(options: any): string
  • Parameters

    • options: any

    Returns string

replaceXTypesInTeq

  • replaceXTypesInTeq(tEQ: Teq): string
  • Replaces xtype by xtype(true) in TEQ string.

    Parameters

    Returns string

result

  • result(origVal: any, path: string, defaultValue: any): any
  • Parameters

    • origVal: any
    • path: string
    • defaultValue: any

    Returns any