new g()
Object to hold EasyRTC General Utility methods and classes.
- Source:
Methods
(static) checkModules()
Reads package.json and ensures all required modules are installed. Will exit if one or more is not found.
- Source:
(static) deepCopy(input) → {Object}
Performs a deep copy of an object, returning the duplicate.
Do not use on objects with circular references.
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Input variable (or object) to be copied. |
- Source:
Returns:
New copy of variable.
- Type
- Object
(static) getPackageData(fieldName) → {Object}
Returns a field from the package.json file in the module root.
Giving null field name will return the full contents of the file.
If a field name is provided, it will return null if the field not found.
Parameters:
Name | Type | Description |
---|---|---|
fieldName |
Object | Name of field you wish to return. |
- Source:
Returns:
Value of the given field, or the full contents of the file if a null field is given.
- Type
- Object