@examgoal/mongodb
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -14,4 +14,4 @@ import { ClientSession, Db, MongoClient } from 'mongodb'; | ||
static initializeApp(config: ConfigOptions): void; | ||
static getInstance(name: string): MongodbClient; | ||
static getInstance(name?: string): MongodbClient; | ||
} | ||
export = MongodbClient; |
@@ -44,3 +44,3 @@ "use strict"; | ||
a.connect().catch(err => { | ||
throw new Error(`${a.name} MongoDB App\'s Error Occurred on first initialization ${err.toString()}`); | ||
throw new Error(`${a.name} MongoDB App\'s Error Occurred on first initialization : Error = ${err.toString()}`); | ||
}); | ||
@@ -52,5 +52,5 @@ } | ||
} | ||
return instances[name]; | ||
return instances[name || '[DEFAULT]']; | ||
} | ||
} | ||
module.exports = MongodbClient; |
{ | ||
"name": "@examgoal/mongodb", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "MongoDB Session Management Helper for ExpressJS or any Node JS Projects", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3533