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

@coya/database

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coya/database - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

9

database.js

@@ -13,3 +13,10 @@ const crypto = require('crypto');

module.exports = class Database {
static connect(dbName, dbLogin, dbPassword, config) {
static connect(config) {
const database = config.dbName || config.database || config.db || config.databaseName;
const login = config.dbLogin || config.login;
const password = config.dbPassword || config.password || config.pw;
if(!database || !login || !password)
throw new Error('Invalid database configuration object.');
logs = new Logs('database', config);

@@ -16,0 +23,0 @@ return mongo.connect('mongodb://' + dbLogin + ':' + dbPassword + '@localhost:27017/' + dbName)

6

package.json
{
"name": "@coya/database",
"version": "0.0.4",
"version": "0.0.5",
"description": "MongoDB database service",

@@ -12,5 +12,5 @@ "main": "database.js",

"dependencies": {
"@coya/logs": "0.0.3",
"@coya/logs": "^0.0.4",
"mongodb": "^2.2.33"
}
}
}
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