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

hare

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hare - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

18

lib/_getConnection.js

@@ -7,5 +7,5 @@ "use strict";

return comb.define(null, {
instance:{
instance: {
constructor:function _GetConnection() {
constructor: function _GetConnection() {
this._super(arguments);

@@ -17,9 +17,19 @@ var args = comb(arguments).toArray(),

}
this.__connection = null;
this.getConnectionCb = connectionCb;
},
getConnection:function () {
return when(this.getConnectionCb());
getConnection: function () {
if (!this.__connection) {
var self = this;
return when(this.getConnectionCb()).chain(function (connection) {
self.__connection = connection;
return connection;
});
} else {
return when(this.__connection);
}
}
}
}).as(module);

@@ -22,5 +22,6 @@ "use strict";

var connect = (function connectWrapper() {
var connectionPromise, connection, isConnected = false;
function connect(url, opts) {
var connectionPromise = new Promise(), connection, isConnected = false;
function ready() {

@@ -30,3 +31,2 @@ isConnected = true;

connection.removeListener("error", connectionError);
//set up error logging
connection.on("error", errorHandler);

@@ -48,14 +48,10 @@ connectionPromise.callback(connection);

return function connect(url, opts) {
if (!connectionPromise) {
connectionPromise = new Promise();
connection = amqp.createConnection(url, opts);
connection.once('ready', ready);
connection.once('error', connectionError);
connection.once("close", checkConnected);
}
return connectionPromise;
};
}());
connection = amqp.createConnection(url, opts);
connection.once('ready', ready);
connection.once('error', connectionError);
connection.once("close", checkConnected);
return connectionPromise;
}
var Hare = comb.define(_Options, {

@@ -62,0 +58,0 @@

{
"name": "hare",
"version": "0.0.9",
"version": "0.0.10",
"description": "Wrapper around amqp to make common patterns easier",

@@ -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