Socket
Socket
Sign inDemoInstall

amqplib-easy

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amqplib-easy - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

28

index.js

@@ -74,2 +74,12 @@ 'use strict';

.then(function () {
function parse(msg) {
return function() {
try {
msg.json = JSON.parse(msg.content.toString());
return handler(msg, ch);
} catch (err) {
console.error('Error converting AMQP message content to JSON.', err);
}
};
}
if (options.retry) {

@@ -83,10 +93,3 @@ return ch.consume(options.queue, retry({

return BPromise.resolve()
.then(function () {
try {
msg.json = JSON.parse(msg.content.toString());
} catch (err) {
console.error('Error converting AMQP message content to JSON.', err);
}
return handler(msg, ch);
});
.then(parse(msg));
}

@@ -98,11 +101,4 @@ }));

return BPromise.resolve()
.then(parse(msg))
.then(function () {
try {
msg.json = JSON.parse(msg.content.toString());
} catch (err) {
console.error('Error converting AMQP message content to JSON.', err);
}
return handler(msg, ch);
})
.then(function () {
return ch.ack(msg);

@@ -109,0 +105,0 @@ })

{
"name": "amqplib-easy",
"version": "2.3.0",
"version": "3.0.0",
"description": "Simplified API for interacting with AMQP",

@@ -5,0 +5,0 @@ "main": "index.js",

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