Module: alfresco/core/ObjectTypeUtils

alfresco/core/ObjectTypeUtils

A mixin that provides the ability to test object types simply. Currently this just aliases the Dojo lang calls which have been deprecated. This allows us to handle the deprecation of those utility functions just from this module.
Author:
  • Dave Draper
License:
Source:

Methods

isArray(The) → {boolean}

Checks to see if the supplied argument is an array.
Parameters:
Name Type Description
The unknown value to test
Source:
Returns:
Returns true if the supplied value is an array
Type
boolean

isBoolean(value) → {boolean}

Checks to see if the supplied argument is a boolean.
Parameters:
Name Type Description
value unknown
Source:
Returns:
Returns true if the supplied value is a boolean
Type
boolean

isNumber(value) → {boolean}

Checks to see if the supplied argument is a number.
Parameters:
Name Type Description
value unknown
Source:
Returns:
Returns true if the supplied value is a number
Type
boolean

isObject(The) → {boolean}

Checks to see if the supplied argument is an object.
Parameters:
Name Type Description
The unknown value to test
Source:
Returns:
Returns true if the supplied value is an object
Type
boolean

isString(The) → {boolean}

Checks to see if the supplied argument is a string.
Parameters:
Name Type Description
The unknown value to test
Source:
Returns:
Returns true if the supplied value is a string
Type
boolean

isUndefined(The) → {boolean}

Checks to see if the supplied argument is undefined
Parameters:
Name Type Description
The unknown value to test
Source:
Returns:
Returns true if the supplied value is undefined
Type
boolean

isValueSet(value, allowEmptyString) → {boolean}

Check a value is neither undefined nor null (returns false). An empty string also returns false unless the allowEmptyString flag is set.
Parameters:
Name Type Description
value object Parameter to check
allowEmptyString boolean Optional flag to indicate that empty strings are valid inputs.
Source:
Returns:
Flag indicating whether the value is set or not.
Type
boolean