Refactor advanced-reactor and nodeClass for improved readability and consistency

This commit is contained in:
2025-07-04 15:14:03 +02:00
parent 3f5b0eea32
commit c6b0cab067
3 changed files with 64 additions and 56 deletions

View File

@@ -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