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

node-red-viseo-helper

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-viseo-helper - npm Package Compare versions

Comparing version 0.1.27 to 0.1.28

62

index.js

@@ -110,2 +110,34 @@ 'use strict';

const setContextValue = exports.setContextValue = (RED, node, data, str, value, type) => {
try {
if (type === "msg") {
RED.util.setMessageProperty(data,str,value);
return true;
}
else if (type === 'global' || type === 'flow') {
let contextKey = RED.util.parseContextStore(str);
let target = node.context()[env];
target.set(contextKey.key, value, contextKey.store, null);
return true;
}
return false;
}
catch(err) {
error(err);
return false;
}
}
const getContextValue = exports.getContextValue = (RED, node, data, str, type) => {
try {
let value = RED.util.evaluateNodeProperty(str, type, node, data, null);
return value;
}
catch(err) {
error(err);
return null;
}
}
const resolve = exports.resolve = (str, obj, def) => {

@@ -151,32 +183,2 @@ if (str === undefined) return str;

const setContextByString = exports.setContextByString = (RED, node, str, value, env) => {
if (!env) env = 'global';
else if (env !== 'global' && env !== 'flow') error('env must be "flow" or "global"');
try {
let contextKey = RED.util.parseContextStore(str);
let target = node.context()[env];
return target.set(contextKey.key, value, contextKey.store, null);
}
catch(err) {
error(err);
return null;
}
}
const getContextByString = exports.getContextByString = (RED, node, str, env) => {
if (!env) env = 'global';
else if (env !== 'global' && env !== 'flow') error('env must be "flow" or "global"');
try {
let contextKey = RED.util.parseContextStore(str);
let target = node.context()[env]
return target.get(contextKey.key, contextKey.store, null);
}
catch(err) {
error(err);
return null;
}
}
// ------------------------------------------

@@ -183,0 +185,0 @@ // EVENT

{
"name" : "node-red-viseo-helper",
"version" : "0.1.27",
"version" : "0.1.28",
"description" : "Utility libarary for Node-RED",

@@ -5,0 +5,0 @@ "dependencies" : {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc