MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / create

Method create

js/node_helper.js:167–175  ·  view source on GitHub ↗

* Create a new NodeHelper subclass with the given module definition. * @param {object} moduleDefinition Methods and properties for the helper. * @returns {typeof NodeHelper} A new subclass of NodeHelper.

(moduleDefinition)

Source from the content-addressed store, hash-verified

165 * @returns {typeof NodeHelper} A new subclass of NodeHelper.
166 */
167 static create (moduleDefinition) {
168 return class extends NodeHelper {
169 constructor () {
170 super();
171 Object.assign(this, moduleDefinition);
172 this.init();
173 }
174 };
175 }
176}
177
178module.exports = NodeHelper;

Callers 7

afterLoadFunction · 0.80
node_helper.jsFile · 0.80
node_helper.jsFile · 0.80
node_helper.jsFile · 0.80
node_helper.jsFile · 0.80
module_spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected