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

@steveorevo/node-red-emerge

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@steveorevo/node-red-emerge - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

21

emerge/emerge.js

@@ -33,2 +33,21 @@ module.exports = function(RED) {

};
function isObject(item) {
return (item && typeof item === 'object' && !Array.isArray(item));
}
function mergeDeep(target, source) {
let output = Object.assign({}, target);
if (isObject(target) && isObject(source)) {
Object.keys(source).forEach(key => {
if (isObject(source[key])) {
if (!(key in target))
Object.assign(output, { [key]: source[key] });
else
output[key] = mergeDeep(target[key], source[key]);
} else {
Object.assign(output, { [key]: source[key] });
}
});
}
return output;
}

@@ -43,3 +62,3 @@ node.on('input', function(msg, send, done) {

}
Object.assign(msgBuffer, msg);
msgBuffer = mergeDeep(msgBuffer, msg);
nodeContext.set('msgBuffer', msgBuffer);

@@ -46,0 +65,0 @@

2

package.json
{
"name": "@steveorevo/node-red-emerge",
"version": "1.1.2",
"version": "1.2.0",
"description": "A node that merges msg objects until all defined properties are present / conditions met before passing the combined msg along.",

@@ -5,0 +5,0 @@ "author": "Stephen J. Carnam <steveorevo@gmail.com>",

Sorry, the diff of this file is too big to display

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