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

modules.data.database

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modules.data.database - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

20

index.js

@@ -1,9 +0,15 @@

function Database (connectionString) {
var mongoose = require('mongoose');
mongoose.connect(connectionString);
this.disconnect = function () {
mongoose.connection.close();
module.exports = {
mongoose: null,
connectionString: null,
connect: function () {
this.mongoose.connect(this.connectionString);
},
disconnect: function () {
this.mongoose.connection.close();
},
init: function (connectionString) {
this.mongoose = require('mongoose');
this.connectionString = connectionString;
this.connect();
}
return this;
}
module.exports = Database;
{
"name" : "modules.data.database",
"description" : "A database module for MongoDB.",
"version" : "0.0.3",
"version" : "0.0.4",
"author" : {

@@ -6,0 +6,0 @@ "name" : "Braun Goodson",

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