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

cosa

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosa - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

20

lib/db.js

@@ -53,8 +53,6 @@ var util = require('util');

});
} else {
var init = (this.connectionStatus !== 'connecting') ? this.init(process.env.COSA_DB_URI) : q.resolve();
init.then(function () {
debug('waiting on connection before loading collection ' + name);
this.on('connect', function () {
this._db.collection(name, options, function (err, collection) {
} else if (this.connectionStatus === 'connecting') {
debug('waiting on connection before loading collection ' + name);
this.on('connect', function () {
this._db.collection(name, options, function (err, collection) {
if (err) { return deferred.reject(err); }

@@ -64,4 +62,12 @@ debug('collection ' + name + ' loaded');

});
});
} else {
this.init(process.env.COSA_DB_URI)
.then(function () {
this._db.collection(name, options, function (err, collection) {
if (err) { return deferred.reject(err); }
debug('collection ' + name + ' loaded');
deferred.resolve(collection);
});
}.bind(this));
}.bind(this));
}

@@ -68,0 +74,0 @@ return deferred.promise;

{
"name": "cosa",
"version": "1.1.0",
"version": "1.1.1",
"description": "Cosa Models for MongoDB",

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

@@ -10,3 +10,2 @@ var chai = require('chai');

require('../lib/index').init();
var Model = require('../lib/model');

@@ -13,0 +12,0 @@ var Immutable = require('../lib/immutable');

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