How to use deferred-leveldown - 1 common examples

To help you get started, we’ve selected a few deferred-leveldown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kitten / graphql-box / src / level / index.ts View on Github external
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
    );
  }

deferred-leveldown

A mock abstract-leveldown implementation that queues operations while a real abstract-leveldown instance is being opened

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular deferred-leveldown functions