Options
All
  • Public
  • Public/Protected
  • All
Menu

Module util

Index

Modules

Classes

Interfaces

Variables

Functions

Object literals

Variables

ajaxCallbacks

ajaxCallbacks: object

Type declaration

ajaxDataCache

ajaxDataCache: object

Type declaration

cookieCache

cookieCache: object

Type declaration

  • [name: string]: any

create

create: addElement

globalIDCount

globalIDCount: number

hiddenholder

hiddenholder: HTMLElement

isAndroid

isAndroid: boolean

isApple

isApple: boolean

isMobile

isMobile: boolean

isTouch

isTouch: boolean

onloadCallbacks

onloadCallbacks: Function[]

toJSON

toJSON: stringify

userAgent

userAgent: any

vector

vector: Vector

zzaddCSSCache

zzaddCSSCache: object

Type declaration

zzgetInternetExplorerVersionCache

zzgetInternetExplorerVersionCache: number

Functions

Counter

  • Counter(start: number): void
  • Parameters

    • start: number

    Returns void

JavaScriptStringEncode

  • JavaScriptStringEncode(sString: any): string
  • Parameters

    • sString: any

    Returns string

JsonHighlight

  • JsonHighlight(json: any, css?: string): string
  • Parameters

    • json: any
    • Default value css: string = "<style>pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; } .mljsonstring { color: green; } .mljsonnumber { color: darkorange; } .mljsonboolean { color: blue; } .mljsonnull { color: magenta; } .mljsonkey { color: red; }</style>"

    Returns string

MlToJSON

  • MlToJSON(obj: any): string
  • Parameters

    • obj: any

    Returns string

RemoveDuplicates

  • RemoveDuplicates(a: any[]): any[]
  • Parameters

    • a: any[]

    Returns any[]

TypeOf

  • TypeOf(thing: any): any
  • Parameters

    • thing: any

    Returns any

Vector

  • Vector(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

_JsonHighlight

  • _JsonHighlight(json: any): any
  • Parameters

    • json: any

    Returns any

_isTouch

  • _isTouch(): boolean
  • Returns boolean

addCSS

  • addCSS(urlOrCSS: any, onload?: function): void
  • Parameters

    • urlOrCSS: any
    • Optional onload: function
        • (): void
        • Returns void

    Returns void

addCommas

  • addCommas(nStr: any): string
  • Parameters

    • nStr: any

    Returns string

addElement

  • addElement(options: IAddElement): HTMLElement
  • addElement(tag: string, cssText?: string, appendTo?: HTMLElement, innerHTML?: string, cssClasses?: string): HTMLElement
  • Parameters

    Returns HTMLElement

  • Parameters

    • tag: string
    • Optional cssText: string
    • Optional appendTo: HTMLElement
    • Optional innerHTML: string
    • Optional cssClasses: string

    Returns HTMLElement

ajaxCache

  • ajaxCache(url: any, timeout: any): any
  • Parameters

    • url: any
    • timeout: any

    Returns any

ajaxData

  • ajaxData(url: string, callback: function, encode?: boolean | number, timeout?: number, onFailCallback?: AjaxDataOnFailCallback): void
  • Parameters

    • url: string
    • callback: function
        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    • Optional encode: boolean | number
    • Optional timeout: number
    • Optional onFailCallback: AjaxDataOnFailCallback

    Returns void

ajaxDataByRequest

  • ajaxDataByRequest(request: any, callback: function, encode?: boolean | number, timeout?: number, onFailCallback?: AjaxDataOnFailCallback): void
  • Parameters

    • request: any
    • callback: function
        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    • Optional encode: boolean | number
    • Optional timeout: number
    • Optional onFailCallback: AjaxDataOnFailCallback

    Returns void

ajaxDataEx

  • ajaxDataEx(url: string, callback: function, options: AjaxDataOptions): void
  • Parameters

    • url: string
    • callback: function
        • (...args: Array<any>): void
        • Parameters

          • Rest ...args: Array<any>

          Returns void

    • options: AjaxDataOptions

    Returns void

ajaxHash

  • ajaxHash(url: string, timeout: number): string
  • Parameters

    • url: string
    • timeout: number

    Returns string

ajaxPost

  • ajaxPost(url: string, data: any, successCallback: mluAPSuccess, errorCallback: mluAPError, ops?: JQueryAjaxSettings): void
  • Parameters

    • url: string
    • data: any
    • successCallback: mluAPSuccess
    • errorCallback: mluAPError
    • Optional ops: JQueryAjaxSettings

    Returns void

appendScript

  • appendScript(url: string, callback: Function, async?: boolean, defer?: boolean): void
  • Parameters

    • url: string
    • callback: Function
    • Default value async: boolean = false
    • Default value defer: boolean = false

    Returns void

applyDefaultAjaxDataOptions

buildWhere

  • buildWhere(q: Query, whereClauses: object): Query
  • Parameters

    • q: Query
    • whereClauses: object
      • col: string
      • test: string
      • value: any

    Returns Query

calculateIdealTextColor

  • calculateIdealTextColor(hexColor: string): string
  • Parameters

    • hexColor: string

    Returns string

camelCase

  • camelCase(str: string): string
  • Parameters

    • str: string

    Returns string

clamp

  • clamp(n: any): number
  • Parameters

    • n: any

    Returns number

clearCookieCache

  • clearCookieCache(): void
  • Returns void

clone

  • clone(object: any): any
  • Parameters

    • object: any

    Returns any

cloneCore

  • cloneCore(object: any): any
  • Parameters

    • object: any

    Returns any

createHiddenHolder

  • createHiddenHolder(): void
  • Returns void

cssFullScreen

  • cssFullScreen(): void
  • Returns void

debounce

  • debounce(func: Function, ms: number): void
  • Parameters

    • func: Function
    • ms: number

    Returns void

dec2hex

  • dec2hex(n: any): any
  • Parameters

    • n: any

    Returns any

decodeFilePath

  • decodeFilePath(str: string): string
  • Parameters

    • str: string

    Returns string

dedupeArray

  • dedupeArray<T>(arr: T): T
  • Type parameters

    • T

    Parameters

    • arr: T

    Returns T

deleteCookie

  • deleteCookie(name: string, path?: string, domain?: string): void
  • Parameters

    • name: string
    • Optional path: string
    • Optional domain: string

    Returns void

downloadFileResult

  • downloadFileResult(url: string, callbackfx: function, waitTimeoutMS?: number): void
  • Parameters

    • url: string
    • callbackfx: function
        • (data?: any, query?: any): void
        • Parameters

          • Optional data: any
          • Optional query: any

          Returns void

    • Default value waitTimeoutMS: number = 7000

    Returns void

encodeFilePath

  • encodeFilePath(str: string): string
  • Parameters

    • str: string

    Returns string

endsWith

  • endsWith(str: any, suffix: any): boolean
  • Parameters

    • str: any
    • suffix: any

    Returns boolean

endsWithAny

  • endsWithAny(str: any, tests: any): boolean
  • Parameters

    • str: any
    • tests: any

    Returns boolean

execOnloadCallbacks

  • execOnloadCallbacks(): void
  • Returns void

fitText

  • fitText(box: any): void
  • Parameters

    • box: any

    Returns void

fixPNG

  • fixPNG(png: any): number
  • Parameters

    • png: any

    Returns number

formToURL

  • formToURL(map: any): string
  • Parameters

    • map: any

    Returns string

funcFromString

  • funcFromString(string: any): any
  • Parameters

    • string: any

    Returns any

funcToString

  • funcToString(func: any): any
  • Parameters

    • func: any

    Returns any

getColumnName

  • getColumnName(value: string): string
  • Parameters

    • value: string

    Returns string

getCookie

  • getCookie(c_name: any): any
  • Parameters

    • c_name: any

    Returns any

getElement

  • getElement(el: any): any
  • Parameters

    • el: any

    Returns any

getFractionalDigits

  • getFractionalDigits(n: number): number
  • Parameters

    • n: number

    Returns number

getJsonPUrl

  • getJsonPUrl(url: string, callbackName: string, encode: boolean | number): string
  • Parameters

    • url: string
    • callbackName: string
    • encode: boolean | number

    Returns string

getNVPFromURL

  • getNVPFromURL(url?: string): any
  • Parameters

    • Optional url: string

    Returns any

getRGBComponents

  • getRGBComponents(color: any): object
  • Parameters

    • color: any

    Returns object

    • B: number
    • G: number
    • R: number

getSavedJson

  • getSavedJson(hash: string, successCallback: any, errorCallback: any): void
  • Parameters

    • hash: string
    • successCallback: any
    • errorCallback: any

    Returns void

getType

  • getType(obj: any): string
  • Parameters

    • obj: any

    Returns string

getWindow

  • getWindow(element: any): any
  • Parameters

    • element: any

    Returns any

hashInt

  • hashInt(txt: any): number
  • Parameters

    • txt: any

    Returns number

height

  • height(el: any): number
  • Parameters

    • el: any

    Returns number

hexColor2rgb

  • hexColor2rgb(color: any): object
  • Parameters

    • color: any

    Returns object

    • b: number
    • g: number
    • r: number

hsv

  • hsv(r: any, g: any, b: any): object
  • Parameters

    • r: any
    • g: any
    • b: any

    Returns object

    • b: number
    • h: any
    • s: any

http

  • http(): string
  • Returns string

ieVersion

  • ieVersion(): number
  • Returns number

input

  • input(idOnly: string, set: any): object
  • Parameters

    • idOnly: string
    • set: any

    Returns object

invertColor

  • invertColor(rgb: any): object
  • Parameters

    • rgb: any

    Returns object

    • b: number
    • g: number
    • r: number

invertCssColor

  • invertCssColor(color: string): string
  • Parameters

    • color: string

    Returns string

is

  • is(obj: any, typeName: any): boolean
  • Parameters

    • obj: any
    • typeName: any

    Returns boolean

isArrayOfArrays

  • isArrayOfArrays(value: any): any
  • Parameters

    • value: any

    Returns any

isElement

  • isElement(el: any): any
  • Parameters

    • el: any

    Returns any

isEmpty

  • isEmpty(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

isEmptyArray

  • isEmptyArray(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isEmptyString

  • isEmptyString(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isFalseBoolean

  • isFalseBoolean(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotEmptyArray

  • isNotEmptyArray(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotEmptyObject

  • isNotEmptyObject(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotEmptyString

  • isNotEmptyString(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotNullObject

  • isNotNullObject(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotNullOrUndefined

  • isNotNullOrUndefined(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNotNullUndefinedOrEmpty

  • isNotNullUndefinedOrEmpty(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNull

  • isNull(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNullOrUndefined

  • isNullOrUndefined(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNullUndefinedOrEmpty

  • isNullUndefinedOrEmpty(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isNumber

  • isNumber(x: any): boolean
  • Parameters

    • x: any

    Returns boolean

isObject

  • isObject(x: any): boolean
  • Parameters

    • x: any

    Returns boolean

isPrimitive

  • isPrimitive(value: any): boolean
  • Returns true if the value is null, undefined, boolean, number, or string.

    Parameters

    • value: any

    Returns boolean

isString

  • isString(x: any): boolean
  • Parameters

    • x: any

    Returns boolean

isTrueBoolean

  • isTrueBoolean(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isUndefined

  • isUndefined(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isValidHexColorString

  • isValidHexColorString(str: any): boolean
  • Parameters

    • str: any

    Returns boolean

isValidNumber

  • isValidNumber(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

isWindow

  • isWindow(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

jsonp

  • jsonp(url: string, callbackName: string, encode: boolean | number, onFailCallback: AjaxDataOnFailCallback): JQueryPromise<Object>
  • Parameters

    Returns JQueryPromise<Object>

keysInterop

  • keysInterop(x: any): Array<string>
  • IE friendlier Object.keys. Will work with strings, numbers, and booleans like Chrome and FF.

    Parameters

    • x: any

    Returns Array<string>

listen

  • listen(evnt: any, elem: any, func: any): any
  • Parameters

    • evnt: any
    • elem: any
    • func: any

    Returns any

loadScript

  • loadScript(url: string, callback: any): void
  • Parameters

    • url: string
    • callback: any

    Returns void

merge

  • merge(...args: any[]): any
  • Parameters

    • Rest ...args: any[]

    Returns any

mousePositionHoverDebug

  • mousePositionHoverDebug(map: Map): object
  • Parameters

    Returns object

    • subscription: KnockoutSubscription
    • toolTip: any
    • dispose: function
      • dispose(): void
      • Returns void

moveArray

  • moveArray(array: any, old_index: any, new_index: any): any
  • Parameters

    • array: any
    • old_index: any
    • new_index: any

    Returns any

moveElementDown

  • moveElementDown(item: any): void
  • Parameters

    • item: any

    Returns void

moveElementUp

  • moveElementUp(item: any): void
  • Parameters

    • item: any

    Returns void

namespace

  • namespace(namespaceString: string): Window
  • Parameters

    • namespaceString: string

    Returns Window

oldIE

  • oldIE(): boolean
  • Returns boolean

onload

  • onload(func: function): void
  • Parameters

    • func: function
        • (): void
        • Returns void

    Returns void

orderedStringify

  • orderedStringify(obj: any, foundObjects?: Array<any>): any
  • Parameters

    • obj: any
    • Optional foundObjects: Array<any>

    Returns any

pageSize

  • pageSize(): object
  • Returns object

processObject

  • processObject(foundObjects: Array<any>, targetObject: any, confirmAddObject: function): void
  • Parameters

    • foundObjects: Array<any>
    • targetObject: any
    • confirmAddObject: function
        • (): void
        • Returns void

    Returns void

quicksave

  • quicksave(map: Map, account?: string, name?: string): void
  • Parameters

    • map: Map
    • Default value account: string = ""
    • Default value name: string = ""

    Returns void

removeAllCookies

  • removeAllCookies(): void
  • Returns void

removeLast

  • removeLast(badtext: any, str: any): any
  • Parameters

    • badtext: any
    • str: any

    Returns any

replaceAll

  • replaceAll(str: string, find: string, replacement: string): string
  • Parameters

    • str: string
    • find: string
    • replacement: string

    Returns string

reverseArray

  • reverseArray(arr: any): Array<any>
  • Parameters

    • arr: any

    Returns Array<any>

rgb2hexColor

  • rgb2hexColor(rgb: any): string
  • Parameters

    • rgb: any

    Returns string

rgb2yuv

  • rgb2yuv(rgb: any): object
  • Parameters

    • rgb: any

    Returns object

    • u: number
    • v: number
    • y: number

selectOptions

  • selectOptions(select: any, options: any, keepItems: any): void
  • Parameters

    • select: any
    • options: any
    • keepItems: any

    Returns void

setCookie

  • setCookie(c_name: any, value: any, expiredays: any): void
  • Parameters

    • c_name: any
    • value: any
    • expiredays: any

    Returns void

setHast

  • setHast(text: any): void
  • Parameters

    • text: any

    Returns void

sort

  • sort<T>(arr: T, prop: any, greatestFirst: boolean): T
  • Type parameters

    • T

    Parameters

    • arr: T
    • prop: any
    • greatestFirst: boolean

    Returns T

stringToNamespace

  • stringToNamespace(className?: string): function
  • Parameters

    • Default value className: string = ""

    Returns function

      • (...args: Array<any>): void
      • Parameters

        • Rest ...args: Array<any>

        Returns void

stringformat

  • stringformat(str: any, repl: any): any
  • Parameters

    • str: any
    • repl: any

    Returns any

toCSV

  • toCSV(row: string[]): string
  • Parameters

    • row: string[]

    Returns string

toCamelCase

  • toCamelCase(val: string): string
  • Parameters

    • val: string

    Returns string

toQueryString

  • toQueryString(params: any): string
  • Parameters

    • params: any

    Returns string

toTitleCase

  • toTitleCase(str: any): any
  • Parameters

    • str: any

    Returns any

truncate

  • truncate(n: number): number
  • Parameters

    • n: number

    Returns number

tryParseInt

  • tryParseInt(str: any, onFailValue: any): any
  • Parameters

    • str: any
    • onFailValue: any

    Returns any

viewHeader

  • viewHeader(tablename: any): void
  • Parameters

    • tablename: any

    Returns void

whenAll

width

  • width(el: any): number
  • Parameters

    • el: any

    Returns number

yuv2rgb

  • yuv2rgb(yuv: any): object
  • Parameters

    • yuv: any

    Returns object

    • b: number
    • g: number
    • r: number

zzMeasureSize

  • zzMeasureSize(el: any, dimension: any): number
  • Parameters

    • el: any
    • dimension: any

    Returns number

Object literals

HexColorRange

HexColorRange: object

defaults

defaults: Array<Array<string>>

generate

  • generate(hex1: string, hex2: string, n: number): Array<any>
  • Parameters

    • hex1: string
    • hex2: string
    • n: number

    Returns Array<any>

globalID

globalID: object

next

  • next(): string
  • Returns string

primitiveTypes

primitiveTypes: object

boolean

boolean: number

number

number: number

string

string: number

undefined

undefined: number

Generated using TypeDoc