How to use the minimongo.MemoryDb function in minimongo

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

github mathew-kurian / Scribe.js / asr / viewer / libs / MongoDB.js View on Github external
return new Promise((resolve, reject) => {
      new minimongo.MemoryDb({namespace: this.namespace}, localDb => {
        const hybridDb = new minimongo.HybridDb(localDb, this.remoteDb);

        let type;
        if (localDb instanceof minimongo.IndexedDb) {
          type = 'IndexedDb';
        } else if (localDb instanceof minimongo.LocalStorageDb) {
          type = 'LocalStorageDb';
        } else if (localDb instanceof minimongo.MemoryDb) {
          type = 'MemoryDb';
        } else if (localDb instanceof minimongo.WebSQLDb) {
          type = 'WebSQLDb';
        } else {
          throw new Error('Can\'t identify db');
        }

        this.hybridDb = hybridDb;

minimongo

Client-side mongo database with server sync over http

LGPL-3.0
Latest version published 2 months ago

Package Health Score

66 / 100
Full package analysis

Similar packages