New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-buffer-parser

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-buffer-parser - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

16

buffer-parser.js

@@ -19,3 +19,3 @@

module.exports = function(RED) {
const RESULTYPEOPTS = ["object", "value", "array", "buffer"];
const RESULTYPEOPTS = ["object", "keyvalue", "value", "array", "buffer"];
const SWAPOPTS = ["swap16", "swap32", "swap64"];

@@ -225,2 +225,3 @@ const TYPEOPTS = [

objectResults : {},
keyvalues : {},
arrayResults : [],

@@ -387,2 +388,3 @@ values : [],

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -536,2 +538,3 @@ result.values.push(item.value);

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -561,2 +564,3 @@ result.values.push(item.value);

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -580,2 +584,3 @@ result.values.push(item.value);

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -602,2 +607,3 @@ result.values.push(item.value);

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -620,2 +626,3 @@ result.values.push(item.value);

result.objectResults[item.name] = item;
result.keyvalues[item.name] = item.value;
result.arrayResults.push(item);

@@ -635,4 +642,4 @@ result.values.push(item.value);

switch (validatedSpec.options.resultType) {
case "array"://not sure about this one!
case "value":
case "keyvalue":
setObjectProperty(m, validatedSpec.options.msgProperty, item.value)

@@ -779,2 +786,3 @@ break;

msg.objectResults = results.objectResults;
msg.keyvalues = results.keyvalues;
msg.arrayResults = results.arrayResults;

@@ -793,2 +801,6 @@ msg.buffer = results.buffer;

break;
case "keyvalue":
case "keyvalues":
setObjectProperty(msg, validatedSpec.options.msgProperty, msg.keyvalues)
break;
case "array":

@@ -795,0 +807,0 @@ setObjectProperty(msg, validatedSpec.options.msgProperty, msg.arrayResults)

2

package.json
{
"name": "node-red-contrib-buffer-parser",
"version": "2.0.2",
"version": "2.1.0",
"description": "A dynamic node to convert values in a buffer or integer array into the many different data type(s). Supports Big/Little Endian, BCD, byte swapping and much more",

@@ -5,0 +5,0 @@ "keywords": [

@@ -42,2 +42,3 @@ node-red-contrib-buffer-parser

* "value" : the parsed values are sent in an array
* "keyvalue" : the parsed values are sent in an object as key/value pairs
* "object" : the parsed values are sent as named objects with the value set `.value` and other contextual properties included (like the item specification)

@@ -44,0 +45,0 @@ * "array" : the parsed values are sent as objects in an array, with each object containing a `.value` property and other contextual properties included (like the item specification)

Sorry, the diff of this file is not supported yet

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