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: AbstractLevelDOWN) {
this.db = new DeferredLevelDOWN(optimiseLevelJs(db)) as InternalLevelDown;
this.put = promisify(this.db.put).bind(this.db);
this.del = promisify(this.db.del).bind(this.db);
this._get = promisify(this.db.get).bind(this.db);
this.db.open(
{
createIfMissing: true,
errorIfExists: false,
},
noop
);
}