node-red-contrib-boolean-logic-ultimate
Advanced tools
Comparing version
@@ -6,15 +6,15 @@ module.exports = function(RED) { | ||
var node = this; | ||
node.status( {fill: "grey" ,shape: "dot" ,text: "waiting"}); | ||
this.on('input', function(msg) { | ||
var topic = msg.topic; | ||
var topic = msg.topic || ""; | ||
var payload = msg.payload; | ||
if (topic !== undefined && payload !== undefined) { | ||
node.status( {fill: "green" ,shape: "dot" ,text: !ToBoolean(payload)}); | ||
return({ topic: topic, payload: !ToBoolean(payload) }); | ||
node.send({ topic: topic, payload: !ToBoolean(payload) }); | ||
return; | ||
} | ||
}); | ||
node.status( {fill: "grey" ,shape: "dot" ,text: payload}); | ||
@@ -21,0 +21,0 @@ function ToBoolean( value ) { |
# node-red-contrib-boolean-logic-ultimate | ||
<p> | ||
<b>Version 0.0.6</b><br/> | ||
- Fixed crappy "Invert" node.<br/> | ||
</p> | ||
<p> | ||
<b>Version 0.0.5</b><br/> | ||
@@ -4,0 +8,0 @@ - Bypass persistency if node-red user hasn't permissions to write to the filesystem.<br/> |
{ | ||
"name": "node-red-contrib-boolean-logic-ultimate", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A set of Node-RED enhanced boolean logic, with persisten values after reboot and more", | ||
@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)", |
# node-red-contrib-boolean-logic-ultimate | ||
[![NPM version][npm-version-image]][npm-url] | ||
[![NPM downloads per month][npm-downloads-month-image]][npm-url] | ||
[![NPM downloads total][npm-downloads-total-image]][npm-url] | ||
[![MIT License][license-image]][license-url] | ||
[](https://standardjs.com) | ||
## DESCRIPTION | ||
@@ -39,2 +46,10 @@ The node performs Boolean logic on the incoming payloads.<br/> | ||
The XOR operation operates in a one, and only one mode, i.e. (A ^ B) ^ C ... ^ n | ||
</p> | ||
</p> | ||
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg | ||
[license-url]: https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/LICENSE | ||
[npm-url]: https://npmjs.org/package/node-red-contrib-boolean-logic-ultimate | ||
[npm-version-image]: https://img.shields.io/npm/v/node-red-contrib-boolean-logic-ultimate.svg | ||
[npm-downloads-month-image]: https://img.shields.io/npm/dm/node-red-contrib-boolean-logic-ultimate.svg | ||
[npm-downloads-total-image]: https://img.shields.io/npm/dt/node-red-contrib-boolean-logic-ultimate.svg |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19487
6.19%223
0.45%55
41.03%