Socket
Socket
Sign inDemoInstall

cosa

Package Overview
Dependencies
12
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.3 to 2.3.4

10

lib/db.js

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

var deferred = q.defer();
if (!/mongodb:\/\//.test(uri)) {
this._uri = uri || process.env.COSA_DB_URI;
if (!/mongodb:\/\//.test(this._uri)) {
deferred.reject(new Error('invalid mongodb uri'));
}
this._uri = uri;
debug('connecting to database: ' + this._uri);

@@ -50,3 +50,3 @@ this._connectionStatus = 'connecting';

var deferred = q.defer();
if (this.connectionStatus === 'connected') {
if (this._connectionStatus === 'connected') {
debug('loading collection ' + name);

@@ -58,3 +58,3 @@ this._db.collection(name, options, function (err, collection) {

});
} else if (this.connectionStatus === 'connecting') {
} else if (this._connectionStatus === 'connecting') {
debug('waiting on connection before loading collection ' + name);

@@ -69,3 +69,3 @@ this.on('connect', function () {

} else {
this.init(process.env.COSA_DB_URI)
this.init()
.then(function () {

@@ -72,0 +72,0 @@ this._db.collection(name, options, function (err, collection) {

{
"name": "cosa",
"version": "2.3.3",
"version": "2.3.4",
"description": "Cosa Models for MongoDB",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc