Namespace: utils

utils

Utility functions

Source:

Methods

(static) exports.deepCopy(target, source) → {Object}

Make deep object copy. If some object property is already exist in target object - it will be replaced by the property from a source object.

Parameters:
Name Type Description
target Object

Target object.

source Object

Source object.

Source:
Returns:

Target object.

Type
Object

(static) exports.deepExtend(target, source) → {Object}

Extend object deeply. Extend the target object with the missed properties from source object.

Parameters:
Name Type Description
target Object

Target object.

source Object

Source object.

Source:
Returns:

Target object.

Type
Object

(static) exports.doesImplements(obj, what) → {bool}

Check if some object supports an interface.

Parameters:
Name Type Description
obj Object

Object to check.

what Interface

Interface, that must be supported by an object.

Source:
Returns:
Type
bool