common_predicates | @uirouter/angular
Options
Menu

Module common_predicates

Predicates

These predicates return true/false based on the input. Although these functions are exported, they are subject to change without notice.

Index

Variables

isArray: isArray = Array.isArray
isDate: function = <any> ((x: any) => toStr.call(x) === '[object Date]')

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isDefined: function = not(isUndefined)

Type declaration

    • (x?: X): boolean
    • Parameters

      • x: Optional  X

      Returns boolean

isFunction: function = <any> tis('function')

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isNullOrUndefined: function = or(isNull, isUndefined)

Type declaration

    • (x?: X): boolean
    • Parameters

      • x: Optional  X

      Returns boolean

isNumber: function = <any> tis('number')

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isPromise: function = <(x: any) => x is Promise<any>> and(isObject, pipe(prop('then'), isFunction))

Predicate which checks if a value looks like a Promise

Predicate which checks if a value looks like a Promise

It is probably a Promise if it's an object, and it has a then property which is a Function

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isRegExp: function = <any> ((x: any) => toStr.call(x) === '[object RegExp]')

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isState: function = StateObject.isState

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isString: function = <(x: any) => x is string> tis('string')

Type declaration

    • (x: any): boolean
    • Parameters

      • x any

      Returns boolean

isUndefined: (Anonymous function) = tis('undefined')
toStr: toString = Object.prototype.toString

Functions

  • isInjectable(val: any): boolean
  • Predicate which checks if a value is injectable

  • Predicate which checks if a value is injectable

    A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array where all the elements in the array are Strings, except the last one, which is a Function

    Parameters

    • val any

    Returns boolean


  • isNull(o: any): boolean
  • isObject(x: any): boolean
  • tis(t: string): (Anonymous function)

Generated using TypeDoc