Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(db = { url: '', username: '', password: '' }) {
const { url, username, password } = db;
const isLocal = url === '*LOCAL';
// eslint-disable-next-line new-cap
this.dbconn = new dbconn();
if (isLocal && !username && !password) {
this.connect();
} else if (url && username && password) {
this.connect(url, username, password);
}
}