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

odemongo

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odemongo - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

12

lib/database.js

@@ -13,11 +13,11 @@ import { MongoClient } from "mongodb";

Database.#db = client.db(databaseName);
this.#db = client.db(databaseName);
if (callback) {
callback();
}
if (callback) callback();
return this.#db;
}
static getDB() {
if (!Database.#db) {
if (!this.#db) {
throw new Error(

@@ -28,4 +28,4 @@ "Connection not established, please connect to the database first"

return Database.#db;
return this.#db;
}
}
export function parseMongoURL(url) {
if (!url) throw new TypeError("You must introduce an URL");
const regex = /^(mongodb:\/\/[^\/]+)\/(.+)$/;

@@ -3,0 +5,0 @@ const matches = url.match(regex);

{
"name": "odemongo",
"version": "1.2.1",
"version": "1.2.2",
"description": "Odemongo is an ODM for MongoDB",

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