common_predicates | @uirouter/angularjs
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): x
    • Parameters

      • x any

      Returns x

isDefined: function = not(isUndefined)

Type declaration

    • (x?: X): boolean
    • Parameters

      • x: Optional  X

      Returns boolean

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

Type declaration

    • (x: any): x
    • Parameters

      • x any

      Returns x

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): x
    • Parameters

      • x any

      Returns x

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): x
    • Parameters

      • x any

      Returns x

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

Type declaration

    • (x: any): x
    • Parameters

      • x any

      Returns x

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

Type declaration

    • (x: any): x
    • Parameters

      • x any

      Returns x

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
  • Parameters

    • o any

    Returns boolean


  • isObject(x: any): boolean
  • Parameters

    • x any

    Returns boolean


  • tis(t: string): (Anonymous function)
  • Parameters

    • t string

    Returns (Anonymous function)


Generated using TypeDoc