This library adds only small set of functions to underscore
, Array
and
Date
type. This additions are commonly used by other libraries used outside.
Function | Description |
---|---|
uncapitalize(str) |
Returns str with first case lower. |
capitalize(str) |
Returns str with first case upper. |
isDefined(object) |
Returns true if passed parameter is defined. |
strContains(str, it) |
Returns true if first parameter contains second. |
endsWith(str, suffix) |
Returns true if first parameter ends with suffix. |
filterRequestData(obj) |
Removes from passed object all properties that value is empty string, null or undefined. Additionally removes all properties which name start from '$' - that are angular internal properties. |
paramsObject(obj) |
Returns object that all properties are serialized to string. |
toUrlParams(obj) |
Transforms object to url query part. |
getByPath(object, path) |
Returns object that is accessed by path in first parameter object. That is:
returns |
setByPath(object, path, value) |
Sets property in |
getOrCreate(object, path) |
Returns object that is accessed by path in first parameter object. That is:
returns
If any part of |
serializeObject(dom) |
Returns serialized form of |
Function | Description |
---|---|
Array.prototype.pushArray(arr) |
Pushes all elements of |
Array.prototype.byProp(property, id) |
Returns first element that has |
Array.prototype.remove(element) |
Removes first instance of |
Array.prototype.filter(fun) |
Returns new array containing all elements for which |
Function | Description |
---|---|
Date.prototype.toISOString() |
Date to ISO string serialization. Added to Date type only if it does not exist. |