Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _loadStorage(config: Config, logger: Logger): IPluginStorage {
const Storage = this._loadStorePlugin();
if (_.isNil(Storage)) {
assert(this.config.storage, 'CONFIG: storage path not defined');
return new LocalDatabase(this.config, logger);
} else {
return Storage as IPluginStorage;
}
}