Constructor
new Utilities()
Construct a utility object.
- Source:
Returns:
A new utitilty object.
Members
(static, readonly) VALUE_ADDED :Number
Static field indicating ad added object property.
Type:
- Number
- Source:
(static, readonly) VALUE_MODIFIED :Number
Static field indicating a modified object property.
Type:
- Number
- Source:
(static, readonly) VALUE_REMOVED :Number
Static field indicating a removed object property.
Type:
- Number
- Source:
Methods
(static) toString()
Return a string representation of the utitility class.
- Source:
Returns:
[jala.Utilities]
createPassword(len, level)
Creates a random password with different levels of security.
Parameters:
Name | Type | Description |
---|---|---|
len |
Number | The length of the password (default: 8) |
level |
Number | The security level
|
- Source:
Returns:
The resulting password
diffObjects(obj1, obj2)
Returns an array containing the properties that are
added, removed or modified in one object compared to another.
Parameters:
Name | Type | Description |
---|---|---|
obj1 |
Object | The first of two objects which should be compared |
obj2 |
Object | The second of two objects which should be compared |
- Source:
Returns:
An Object containing all properties that are added, removed
or modified in the second object compared to the first.
Each property contains a status field with an integer value
which can be checked against the static jala.Utility fields
VALUE_ADDED, VALUE_MODIFIED and VALUE_REMOVED.
patchObject(obj, diff)
Patches an object with a "diff" object created by the
#diffObjects method.
Please mind that this method is recursive, it descends
along the "diff" object structure.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | The Object the diff should be applied to |
diff |
Object | A "diff" object created by the #diffObjects method |
- Source:
Returns:
The patched Object with all differences applied
toString()
Return a string representation of the utitility object.
- Source:
Returns:
[jala.Utilities Object]