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

natsify

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

natsify - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

25

dist/index.js

@@ -58,2 +58,3 @@ 'use strict';

* @param {String} subject
* @param {String} payload
*

@@ -79,2 +80,3 @@ * @returns {Promise}

* @param {String} subject
* @param {String} payload
*

@@ -90,4 +92,8 @@ * @returns {Promise}

return new Promise(function (resolve, reject) {
_this3.connection.publish(subject, payload, function () {
resolve();
_this3.connection.publish(subject, payload, function (error) {
if (error) {
reject(error);
} else {
resolve();
}
});

@@ -97,2 +103,17 @@ });

}, {
key: 'flush',
value: function flush() {
var _this4 = this;
return new Promise(function (resolve, reject) {
_this4.connection.flush(function (error) {
if (error) {
reject(error);
} else {
resolve();
}
});
});
}
}, {
key: 'close',

@@ -99,0 +120,0 @@ value: function close() {

2

package.json
{
"name": "natsify",
"version": "0.0.2",
"version": "0.0.3",
"description": "A nuts wrapper with promises",

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

@@ -35,2 +35,3 @@ import { connect } from 'nats'

* @param {String} subject
* @param {String} payload
*

@@ -51,2 +52,3 @@ * @returns {Promise}

* @param {String} subject
* @param {String} payload
*

@@ -57,4 +59,8 @@ * @returns {Promise}

return new Promise((resolve, reject) => {
this.connection.publish(subject, payload, () => {
resolve()
this.connection.publish(subject, payload, error => {
if (error) {
reject(error)
} else {
resolve()
}
})

@@ -64,2 +70,14 @@ })

flush () {
return new Promise((resolve, reject) => {
this.connection.flush(error => {
if (error) {
reject(error)
} else {
resolve()
}
})
})
}
close () {

@@ -66,0 +84,0 @@ this.connection.close()

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