Refactor advanced-reactor and nodeClass for improved readability and consistency
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
const nameOfNode = "advanced-reactor"; // name of the node, should match file name and node type in Node-RED
|
||||
const nodeClass = require('./src/nodeClass.js'); // node class
|
||||
|
||||
module.exports = function(RED) {
|
||||
module.exports = function (RED) {
|
||||
// Register the node type
|
||||
RED.nodes.registerType(nameOfNode, function(config) {
|
||||
RED.nodes.registerType(nameOfNode, function (config) {
|
||||
// Initialize the Node-RED node first
|
||||
RED.nodes.createNode(this, config);
|
||||
// Then create your custom class and attach it
|
||||
|
||||
Reference in New Issue
Block a user