Home Manual ReferenceGraphs Source Repository
public class | source

Utils

Provides static common utility methods.

Static Method Summary

Static Public Methods
public static

invokeOrValue(object: object, property: string): *

Invokes the property as a function if it exists returning the result or just the property value.

public static

isNullOrUndef(unknown: *): boolean

Method for checking whether a variable is undefined or null.

public static

isTypeOf(childType: *, parentType: *): boolean

Method for checking if a given child is a type of the parent.

Static Public Methods

public static invokeOrValue(object: object, property: string): * source

Invokes the property as a function if it exists returning the result or just the property value.

Params:

NameTypeAttributeDescription
object object

Object to inspect.

property string

Property value to return or function name to invoke and return.

Return:

*

public static isNullOrUndef(unknown: *): boolean source

Method for checking whether a variable is undefined or null.

Params:

NameTypeAttributeDescription
unknown *

Variable to test.

Return:

boolean

public static isTypeOf(childType: *, parentType: *): boolean source

Method for checking if a given child is a type of the parent.

Params:

NameTypeAttributeDescription
childType *

Child type to test.

parentType *

Parent type to match against child prototype.

Return:

boolean