- Source:
Util functions
Methods
# (static) clone(obj)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
obj |
Returns:
# (static) defaults(target, source) → {Object}
- Source:
Extend properties to target if not exist.
Parameters:
Name | Type | Description |
---|---|---|
target |
Object | |
source |
Object |
Returns:
- Type
- Object
# (static) defaultsWithPropList(target, source, propList) → {Object}
- Source:
Extend properties to target if not exist. With a given property list avoid for..in.. iteration.
Parameters:
Name | Type | Description |
---|---|---|
target |
Object | |
source |
Object | |
propList |
Array.<string> |
Returns:
- Type
- Object
# (static) each(obj, iterator, contextopt)
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Array | ||
iterator |
function | ||
context |
Object |
<optional> |
# (static) extend(target, source) → {Object}
- Source:
Extend target with source
Parameters:
Name | Type | Description |
---|---|---|
target |
Object | |
source |
Object |
Returns:
- Type
- Object
# (static) extendWithPropList(target, source, propList) → {Object}
- Source:
Extend properties with a given property list to avoid for..in.. iteration.
Parameters:
Name | Type | Description |
---|---|---|
target |
Object | |
source |
Object | |
propList |
Array.<string> |
Returns:
- Type
- Object
# (static) genGUID() → {number}
- Source:
Generate GUID
Returns:
- Type
- number
# (static) isArray(obj) → {boolean}
- Source:
Is array ?
Parameters:
Name | Type | Description |
---|---|---|
obj |
Returns:
- Type
- boolean
# (static) isArrayLike(obj) → {boolean}
- Source:
Is array like, which have a length property
Parameters:
Name | Type | Description |
---|---|---|
obj |
Returns:
- Type
- boolean
# (static) isObject(obj) → {boolean}
- Source:
Is object
Parameters:
Name | Type | Description |
---|---|---|
obj |
Returns:
- Type
- boolean
# (static) relative2absolute(path, basePath) → {string}
- Source:
Relative path to absolute path
Parameters:
Name | Type | Description |
---|---|---|
path |
string | |
basePath |
string |
Returns:
- Type
- string