Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

node-red-contrib-boolean-logic-ultimate

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-boolean-logic-ultimate - npm Package Compare versions

Comparing version 1.0.29 to 1.0.30

@@ -7,3 +7,3 @@ module.exports = function (RED) {

var path = require("path");
node.config = config;

@@ -13,4 +13,4 @@ node.jSonStates = {}; // JSON object containing the states.

node.persistPath = path.join(RED.settings.userDir, "booleanlogicultimatepersist"); // 26/10/2020 Contains the path for the states dir.
node.restrictinputevaluation = config.restrictinputevaluation === undefined ? false : config.restrictinputevaluation;
function setNodeStatus({ fill, shape, text }) {

@@ -81,7 +81,2 @@ var dDate = new Date();

}
// 28/08/2020 inform user about undefined topic or payload
if (!msg.hasOwnProperty("payload") || typeof (msg.payload) == "undefined") {
setNodeStatus({ fill: "red", shape: "dot", text: "Received invalid payload!" });
return;
}

@@ -95,5 +90,14 @@ // 28/08/2020 inform user about undefined topic or payload

if (!msg.hasOwnProperty("payload") || typeof (msg.payload) == "undefined") {
setNodeStatus({ fill: "red", shape: "dot", text: "Received invalid payload!" });
setNodeStatus({ fill: "red", shape: "dot", text: "Received invalid payload from " + msg.topic });
return;
}
// 12/08/2021 Restrict only to true/false and 0/1
if (node.restrictinputevaluation) {
if (msg.payload !== true && msg.payload !== false) {
setNodeStatus({ fill: "red", shape: "dot", text: "Received non boolean value from " + msg.topic });
return;
}
}
var topic = msg.topic;

@@ -207,4 +211,4 @@ var payload = msg.payload;

function CalculateResult(_operation) {

@@ -211,0 +215,0 @@ var res;

@@ -5,2 +5,6 @@ # node-red-contrib-boolean-logic-ultimate

<p>
<b>Version 1.0.30</b> August 2021<br/>
- NEW: Boolean-Logic-Ulimate can now strict filter for input payload, by accepting only boolean true/false values. If the option is not enabled, the node will continue to try to transform the input payload to a suitable boolean value.</br>
</p>
<p>
<b>Version 1.0.29</b> May 2021<br/>

@@ -7,0 +11,0 @@ - NEW: StatusUltimate node: show the status of the passing-through message.</br>

{
"name": "node-red-contrib-boolean-logic-ultimate",
"version": "1.0.29",
"version": "1.0.30",
"description": "A set of Node-RED enhanced boolean logic node, flow interruption node, blinker node, invert node, filter node, with persisten values after reboot and more.",

@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)",

Sorry, the diff of this file is not supported yet