0.0.16 • Published 1 year ago

node-red-contrib-noderedbase v0.0.16

Weekly downloads
-
License
GPL-3.0
Repository
gitlab
Last release
1 year ago

node-red-contrib-prib-noderedBase

Base module of functions when developing own nodes in Node-Red

Description

Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.


Usage

	const noderedBase=require("noderedBase");
    RED.nodes.createNode(this,n);
    const node=Object.assign(this,n);
	node._base=new noderedBase(RED,node);
	try{
		this._base.setSource("key").setTarget("target")
	} catch(ex) {
		node._base.error(ex,"Invalid setup "+ex.message);
		return;
	}
	node.on("input",function (msg) {
		try{
			const key=node.getKey(msg);
			node.setTarget(key,msg);
			node.send(msg);
		} catch(ex) {
			msg.error=ex.message;
			node.send([null,msg]);
	});

Installation

Run the following command in the root directory of your Node-RED install

npm install node-red-contrib-noderedbase

Tests

Test/example flow in test/generalTest.json


Version

0.0.1 initial base


Author

Peter Prib

0.0.16

1 year ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago