Class: Utilities

Utilities

Utility functions

Constructor

new Utilities()

Create an instance of the Utilities class.
Source:

Methods

cloneDR(o) → {object}

Deep clone an object.
Parameters:
Name Type Description
o object The object to be cloned.
Source:
Returns:
result - A deep clone of an object.
Type
object

cloneDR(o) → {object}

Deep clone an object.
Parameters:
Name Type Description
o object The object to be cloned.
Source:
Returns:
result - A deep clone of an object.
Type
object

isObjLiteral(_obj) → {boolea}

Check if an object is an object literal.
Parameters:
Name Type Description
_obj object The object to be inspected.
Source:
Returns:
True if the object is a literal, false otherwise.
Type
boolea

isObjLiteral(_obj) → {boolea}

Check if an object is an object literal.
Parameters:
Name Type Description
_obj object The object to be inspected.
Source:
Returns:
True if the object is a literal, false otherwise.
Type
boolea

shadeColor(colorHex, percent) → {string}

Darkens or lightens hex color value.
Parameters:
Name Type Description
colorHex string The hex color string.
percent number The percentage ranges form -100(dark) to +100(light).
Source:
Returns:
The new color hex.
Type
string

shadeColor(colorHex, percent) → {string}

Darkens or lightens hex color value.
Parameters:
Name Type Description
colorHex string The hex color string.
percent number The percentage ranges form -100(dark) to +100(light).
Source:
Returns:
The new color hex.
Type
string

Utilities

Utility functions

Constructor

new Utilities()

Create an instance of the Utilities class.
Source:

Methods

cloneDR(o) → {object}

Deep clone an object.
Parameters:
Name Type Description
o object The object to be cloned.
Source:
Returns:
result - A deep clone of an object.
Type
object

cloneDR(o) → {object}

Deep clone an object.
Parameters:
Name Type Description
o object The object to be cloned.
Source:
Returns:
result - A deep clone of an object.
Type
object

isObjLiteral(_obj) → {boolea}

Check if an object is an object literal.
Parameters:
Name Type Description
_obj object The object to be inspected.
Source:
Returns:
True if the object is a literal, false otherwise.
Type
boolea

isObjLiteral(_obj) → {boolea}

Check if an object is an object literal.
Parameters:
Name Type Description
_obj object The object to be inspected.
Source:
Returns:
True if the object is a literal, false otherwise.
Type
boolea

shadeColor(colorHex, percent) → {string}

Darkens or lightens hex color value.
Parameters:
Name Type Description
colorHex string The hex color string.
percent number The percentage ranges form -100(dark) to +100(light).
Source:
Returns:
The new color hex.
Type
string

shadeColor(colorHex, percent) → {string}

Darkens or lightens hex color value.
Parameters:
Name Type Description
colorHex string The hex color string.
percent number The percentage ranges form -100(dark) to +100(light).
Source:
Returns:
The new color hex.
Type
string