Methods
compactObject() → {object}
compactObject - deletes the empty valued properties from the object
Parameters:
Type | Description |
---|---|
Object | The object |
Returns:
compactobj - object free from empty valued properties.
- Type
- object
convertCamelCaseToReadable(s1)
- If you combine more than two strings without any spaces between in it. It will make it readable by providing space between each and every string.
Parameters:
Name | Type | Description |
---|---|---|
s1 |
string | Enter camel case string to convert to readable. |
Returns:
s1 - Returns the each and every string by separating with spaces in between it.
deepExtend(target, source) → {object}
Similar to _.extend but does a deep extend
Parameters:
Name | Type | Description |
---|---|---|
target |
object | The target object to which source object properties to be merged. |
source |
object | The source object properties which need's to be merged to target. |
Returns:
target - Returns the target object which has the source object properties after merging it.
- Type
- object
diffobject(object1, object2) → {object}
Compares Object1 with Object2 and returns the different key-value pairs
Parameters:
Name | Type | Description |
---|---|---|
object1 |
string | Enter object1 to compare with object2 |
object2 |
string | Enter object2 to compare with object1 |
Returns:
diffobject - Returns the different key-value pairs in object1 and object2.
- Type
- object
move(array, fromIndex, toIndex) → {array}
Moves the element from fromIndex to toIndex in the array
Parameters:
Name | Type | Description |
---|---|---|
array |
array | The array in which element is to be moved |
fromIndex |
number | The element index which it has to be moved |
toIndex |
number | The index where the element is to be moved |
Returns:
array - The array with moved element.
- Type
- array
recursiveOmit() → {object}
Removes the empty valued properties from the object recursively
Parameters:
Type | Description |
---|---|
Object | The object. |
Returns:
compactobj - object free from empty valued properties deep.
- Type
- object