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

native-mongo-util

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-mongo-util - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

17

index.js
const Log = require('lil-logger').getLogger(__filename);
const memoize = require('memoizee');
const sleep = require('then-sleep');
const Promise = require('bluebird');
const { MongoClient } = require('mongodb');
const mongodbURL = process.env.MONGO_URL || 'mongodb://localhost/lilprod-db';
const mongodbURL = process.env.MONGO_URL || 'mongodb://localhost/test';

@@ -21,11 +21,10 @@ let _client;

_client = await MongoClient.connect(mongodbURL, {
promiseLibrary: require('bluebird'),
loggerLevel: 'error',
reconnectInterval: 2000
promiseLibrary: Promise,
loggerLevel: 'error'
});
_db = _client.db();
Log.debug({ msg: `DB connected: ${_db.databaseName}` });
Log.debug({ msg: `DB connected: ${exports.getDBName()}` });
isConnecting = false;
}
return Object.freeze(_db);
return _db;
};

@@ -35,5 +34,7 @@

await exports.getDB();
return Object.freeze(_client);
return _client;
};
exports.getDBName = () => _db.databaseName;
exports.getCollection = memoize(collectionName => _db.collection(collectionName));

@@ -40,0 +41,0 @@

{
"name": "native-mongo-util",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

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