diff --git a/src/lib/QuickMongoClient.ts b/src/lib/QuickMongoClient.ts index 1d13eb4..fde2862 100644 --- a/src/lib/QuickMongoClient.ts +++ b/src/lib/QuickMongoClient.ts @@ -2,9 +2,7 @@ import { connect, disconnect } from 'mongoose' import { MongoClientOptions } from 'mongodb' import { IQuickMongoEvents } from '../types/Database' - import { Emitter } from './utils/Emitter' -import { typeOf } from './utils/functions/typeOf.function' import { QuickMongo } from './QuickMongo' import { QuickMongoError } from './utils/QuickMongoError' @@ -118,7 +116,7 @@ export class QuickMongoClient< } if ( - typeOf(connectionURI) !== 'string' || + typeof connectionURI !== 'string' || (!connectionURI.startsWith('mongodb://') && !connectionURI.startsWith('mongodb+srv://')) ) { diff --git a/src/lib/utils/functions/typeOf.function.ts b/src/lib/utils/functions/typeOf.function.ts index 71b0d02..08711fd 100644 --- a/src/lib/utils/functions/typeOf.function.ts +++ b/src/lib/utils/functions/typeOf.function.ts @@ -16,5 +16,5 @@ export const typeOf = (input: any): string => { return input.name } - return input.constructor.name.toLowerCase() + return input.constructor.name }