Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const CHECK_RULES

CHECK_RULES: { date: { msg: string; test: any }; email: { msg: string; test: any }; phone: { msg: string; test: any }; required: { msg: string; test: any }; url: { msg: string; test: any } } = ...

Type declaration

  • date: { msg: string; test: any }
    • msg: string
    • test: function
      • test(obj: any): any
  • email: { msg: string; test: any }
    • msg: string
    • test: function
      • test(obj: any): any
  • phone: { msg: string; test: any }
    • msg: string
    • test: function
      • test(obj: any): any
  • required: { msg: string; test: any }
    • msg: string
    • test: function
      • test(obj: any, load: any): any
  • url: { msg: string; test: any }
    • msg: string
    • test: function
      • test(obj: any): any

Functions

Const areEqualNumbers

  • areEqualNumbers(num1: number, num2: number): boolean

Const checkArray

  • checkArray(obj: any): void
  • Checks for an object to be of the array type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkBoolean

  • checkBoolean(obj: any): void
  • Checks for an object to be of the boolean type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkDate

  • checkDate(obj: any): void
  • Checks for an object to be of the date type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkDateBy

  • checkDateBy(value: string, regex?: string | RegExp): boolean
  • Parameters

    • value: string
    • regex: string | RegExp = ...

    Returns boolean

Const checkEmail

  • checkEmail(value: string): boolean

Const checkFloatNumber

  • checkFloatNumber(obj: any): void
  • Checks for an object to be of the float number type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkFunction

  • checkFunction(obj: any): void
  • Checks for an object to be of the function type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkIntNumber

  • checkIntNumber(obj: any): void
  • Checks for an object to be of the integer number type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkJson

  • checkJson(obj: any): void
  • Checks for an object to be of the json type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkNull

  • checkNull(obj: any): void
  • Checks for an object to be of the null type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkNumber

  • checkNumber(obj: any): void
  • Checks for an object to be of the number type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkObject

  • checkObject(obj: any): void
  • Checks for an object to be of the object type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkPhone

  • checkPhone(value: string): boolean

Const checkProperty

  • checkProperty(obj: any, prop: string | number | symbol): void
  • Parameters

    • obj: any
    • prop: string | number | symbol

    Returns void

Const checkRange

  • checkRange(index: number, array: any[]): void

Const checkString

  • checkString(obj: any): void
  • Checks for an object to be of the string type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkStringByPatterns

  • checkStringByPatterns(str: string): boolean

Const checkType

  • checkType(obj: any, type: any): void
  • Checks for an object to be of the specified type; if not throws an Error.

    Parameters

    • obj: any
    • type: any

    Returns void

Const checkTypes

  • checkTypes(types: string[], ...args: any[]): void
  • Parameters

    • types: string[]
    • Rest ...args: any[]

    Returns void

Const checkUndefined

  • checkUndefined(obj: any): void
  • Checks for an object to be of the undefined type; if not throws an Error.

    Parameters

    • obj: any

    Returns void

Const checkUrl

  • checkUrl(value: string): boolean

Const getClass

Const getType

  • getType(obj: any): string

Const hasClass

  • hasClass(clazz: string, pattern: string): boolean

Const hasProperty

  • hasProperty(obj: any, prop: string | number | symbol): boolean
  • Returns a boolean indicating whether the object has the specified property.

    Parameters

    • obj: any

      An object.

    • prop: string | number | symbol

      A property name.

    Returns boolean

Const hasProperty2

  • hasProperty2(obj: any, prop: string | number | symbol): boolean
  • Parameters

    • obj: any
    • prop: string | number | symbol

    Returns boolean

Const is

  • is(obj: any, type: any): boolean
  • Determines whether an object is instance of a given type.

    Parameters

    • obj: any

      An object.

    • type: any

      The type to check.

    Returns boolean

Const isAlphaNumeric

  • isAlphaNumeric(value: any): boolean

Const isArray

  • isArray(value: any): boolean

Const isArray2

  • isArray2(arg: any): arg is any[]

Const isArrayBuffer

  • isArrayBuffer(value: any): boolean

Const isArrayIndex

  • isArrayIndex(key: string): boolean

Const isBlankString

  • isBlankString(value: string): boolean

Const isBoolean

  • isBoolean(value: any): boolean

Const isBuffer

  • isBuffer(value: any): boolean

Const isDate

  • isDate(value: any): boolean

Const isDigit

  • isDigit(chr: string): boolean

Const isDomElement

  • isDomElement(value: any): boolean

Const isEmptyWithoutZero

  • isEmptyWithoutZero(v: string | number): boolean

Const isFloat

  • isFloat(value: any): boolean

Const isFunction

  • isFunction(value: any): boolean

Const isHostMethod

  • isHostMethod(obj: any, prop: string | number | symbol): boolean
  • Parameters

    • obj: any
    • prop: string | number | symbol

    Returns boolean

Const isHostObject

  • isHostObject(obj: any, prop: string | number | symbol): boolean
  • Parameters

    • obj: any
    • prop: string | number | symbol

    Returns boolean

Const isInRange

  • isInRange(num: number, min: number, max: number, includeBounds?: boolean): boolean
  • Parameters

    • num: number
    • min: number
    • max: number
    • includeBounds: boolean = false

    Returns boolean

Const isIntNumber

  • isIntNumber(value: any): boolean

Const isInteger

  • isInteger(value: any): boolean

Const isIterable

  • isIterable(value: any): boolean

Const isJSON

  • isJSON(value: any): boolean

Const isMobileBrowser

  • isMobileBrowser(navigator: string): boolean

Const isNotNull

  • isNotNull(value: any): boolean

Const isNotUndefined

  • isNotUndefined(value: any): boolean

Const isNull

  • isNull(value: any): boolean

Const isNullOrUndefined

  • isNullOrUndefined(value: any): boolean
  • returns true if value is null or undefined, false - otherwise

    Parameters

    • value: any

    Returns boolean

Const isNumber

  • isNumber(value: any): boolean

Const isNumeric

  • isNumeric(num: any): boolean

Const isObject

  • isObject(value: any): boolean

Const isObjectLiteral

  • isObjectLiteral(obj: any): any

Const isObjectWith

  • isObjectWith(obj: any, prop: string | number | symbol): boolean
  • Parameters

    • obj: any
    • prop: string | number | symbol

    Returns boolean

Const isPlainObject

  • isPlainObject(obj: any): boolean
  • Taken from jQuery 1.6.1

    function

    isPlainObject

    see

    jQuery

    Parameters

    • obj: any

    Returns boolean

Const isPositiveDecimal

  • isPositiveDecimal(value: any): boolean

Const isPowerOfTwo

  • isPowerOfTwo(value: number): boolean

Const isPropertyInRange

  • isPropertyInRange(obj: any, prop: string | number | symbol, low: number, high: number, includeBounds?: boolean): void
  • Parameters

    • obj: any
    • prop: string | number | symbol
    • low: number
    • high: number
    • includeBounds: boolean = false

    Returns void

Const isRealNumber

  • isRealNumber(value: any): boolean

Const isRegExp

  • isRegExp(value: any): boolean

Const isSafeInt

  • isSafeInt(value: any): boolean

Const isSet

  • isSet(value: any): boolean

Const isString

  • isString(value: any): boolean

Const isUndefined

  • isUndefined(value: any): boolean

Const isValidSymbol

  • isValidSymbol(symbol: any): boolean
  • isValidSymbol checks to see if the symbol is of correct type and format

    Parameters

    • symbol: any

      the symbol being checked

    Returns boolean

    returns true if symbol is a string and valid format

Const isWindow

  • isWindow(obj: any): boolean
  • A crude way of determining if an object is a window. Taken from jQuery 1.6.1

    function

    isWindow

    see

    jQuery

    Parameters

    • obj: any

    Returns boolean

Const sanitizeNumber

  • sanitizeNumber(value: string): number

Const type

  • type(obj: any): string