Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (typeof arguments[1] === 'string' || typeof arguments[2] === 'string') return {
dbType: arguments[0],
dbURI: arguments[1],
dbName: arguments[2]
};
if (started || !options) return backend;
if (!ModelControllerPath[options.type]) throw new Error('Invalid database type.');
started = true;
var ModelController = require(ModelControllerPath[options.type]);
module.exports.ComparisonOperators = ModelController.ComparisonOperators;
module.exports.LogicalOperators = ModelController.LogicalOperators;
module.exports.ComputationOperators = ModelController.ComputationOperators;
backend.setComparisonOperators(ModelController.ComparisonOperators);
backend.setLogicalOperators(ModelController.LogicalOperators);
backend.setComputationOperators(ModelController.ComputationOperators);
backend.setModelController(ModelController.getModelControllerObject(options, function () {
// if (!error) {
// } else {
// }
}), path);
return backend;
};