Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides some assert operations. Use for only validations.

export
class

Assertions

static

Hierarchy

  • Assertions

Index

Methods

Static equals

  • equals(src: any, dest: any): void
  • Asserts the given src parameter equals the given destination parameter or not. if src not equals destination then throw error.

    static
    throws

    new Error(${src} is not equals ${dest})

    Parameters

    • src: any
    • dest: any

    Returns void

Static has

  • has(o: any): void
  • Asserts the given parameter has value or not. It has not value then throw error.

    static
    throws

    new Error(${o} has not value)

    Parameters

    • o: any

    Returns void

Static hasNot

  • hasNot(o: any): void
  • Asserts the given parameter has value or not. It has value then throw error.

    static
    throws

    new Error(${o} has value)

    Parameters

    • o: any

    Returns void

Static isArray

  • isArray(o: any): void
  • Asserts the given parameter type is Array or not. It is not Array then throw error.

    static
    throws

    new Error(${o} type is not Array)

    Parameters

    • o: any

    Returns void

Static isBoolean

  • isBoolean(o: any): void
  • Asserts the given parameter type is Boolean or not. It is not Boolean then throw error.

    static
    throws

    new Error(${o} type is not Boolean)

    Parameters

    • o: any

    Returns void

Static isDate

  • isDate(o: any): void
  • Asserts the given parameter type is Date or not. It is not Date then throw error.

    static
    throws

    new Error(${o} type is not Date)

    Parameters

    • o: any

    Returns void

Static isFunction

  • isFunction(o: any): void
  • Asserts the given parameter type is Function or not. It is not Function then throw error.

    static
    throws

    new Error(${o} type is not Function)

    Parameters

    • o: any

    Returns void

Static isJsonType

  • isJsonType(o: any): void
  • Asserts the given parameter type is JsonType or not. Is not JsonType then throw error.

    static
    throws

    new Error(${o} is not json type !)

    Parameters

    • o: any

    Returns void

Static isNativeType

  • isNativeType(o: any): void
  • Asserts the given parameter type is NativeType or not. It is not NativeType then throw error.

    static
    throws

    new Error(${o} is not native type !)

    Parameters

    • o: any

    Returns void

Static isNull

  • isNull(o: any): void
  • Asserts the given parameter type is Null or not. It is notNull then throw error.

    static
    throws

    new Error(${o} type is not Null)

    Parameters

    • o: any

    Returns void

Static isNumber

  • isNumber(o: any): void
  • Asserts the given parameter type is Number or not. It is not Number then throw error.

    static
    throws

    new Error(${o} type is not Number)

    Parameters

    • o: any

    Returns void

Static isObject

  • isObject(o: any): void
  • Asserts the given parameter type is Object or not. It is not Object then throw error.

    static
    throws

    new Error(${o} type is not Object)

    Parameters

    • o: any

    Returns void

Static isPrimitive

  • isPrimitive(o: any): void
  • Asserts the given parameter type is Primitive or not. Is not primitive then throw error.

    static
    throws

    new Error(${o} is not primitive type !)

    Parameters

    • o: any

    Returns void

Static isRegExp

  • isRegExp(o: any): void
  • Asserts the given parameter type is RegExp or not. It is not RegExp then throw error.

    static
    throws

    new Error(${o} type is not RegExp)

    Parameters

    • o: any

    Returns void

Static isString

  • isString(o: any): void
  • Asserts the given parameter type is String or not. It is not String then throw error.

    static
    throws

    new Error(${o} type is not String)

    Parameters

    • o: any

    Returns void

Static isUndefined

  • isUndefined(o: any): void
  • Asserts the given parameter type is Undefined or not. It is not Undefined then throw error.

    throws

    new Error(${o} type is not undefined)

    Parameters

    • o: any

    Returns void

Generated using TypeDoc