Showing 2 of 2 total issues
Function connect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public connect(): Promise<void> {
if (this._client !== undefined) {
return Promise.resolve();
}
return new Promise((resolve, reject) => {
Function insert
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public insert(id: I, object: T): Promise<T> {
return new Promise<T>((resolve, reject) => {
if (this._collection === undefined) {
return reject(new Error(`MongoDB connection not ready!`));
}