How to use the pouchdb-browser.debug function in pouchdb-browser

To help you get started, we’ve selected a few pouchdb-browser 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 QurateInc / vue-pouch-db / index.js View on Github external
}

      this$1.databases[dbname] = new PouchDB(dbname, options);

      PouchDB.sync(
        dbname,
        ((config.remote) + "/" + dbname),
        config.sync
      );

      return this$1.databases[dbname];
    };

    if (process.env.NODE_ENV !== 'production') {
      if (config.debug === true) {
        PouchDB.debug.enable('*');
        window.PouchDB = PouchDB;
      }
    }
  }
};
github ArkEcosystem / desktop-wallet / src / renderer / store / db / interface.js View on Github external
import PouchDB from 'pouchdb-browser'
import PouchDebug from 'pouchdb-debug'
import PouchUpsert from 'pouchdb-upsert'
import PouchFind from 'pouchdb-find'
import PouchLiveFind from 'pouchdb-live-find'

import Model from '@/models/model'

PouchDB.plugin(PouchDebug)

if (process.env.DEBUG_POUCHDB) {
  PouchDB.debug.enable('*')
} else {
  PouchDB.debug.disable()
}

PouchDB.plugin(PouchUpsert)
PouchDB.plugin(PouchFind)
PouchDB.plugin(PouchLiveFind)

/**
 * This class wraps the PouchDB interface to provide some methods that deal with
 * the revisions (`_rev`) automatically.
 */
class DbInterface {
  /**
   * Creates an instance of DbInterface and the main index
   * @param {String} name
github ArkEcosystem / desktop-wallet / src / renderer / store / db / interface.js View on Github external
import PouchDB from 'pouchdb-browser'
import PouchDebug from 'pouchdb-debug'
import PouchUpsert from 'pouchdb-upsert'
import PouchFind from 'pouchdb-find'
import PouchLiveFind from 'pouchdb-live-find'

import Model from '@/models/model'

PouchDB.plugin(PouchDebug)

if (process.env.DEBUG_POUCHDB) {
  PouchDB.debug.enable('*')
} else {
  PouchDB.debug.disable()
}

PouchDB.plugin(PouchUpsert)
PouchDB.plugin(PouchFind)
PouchDB.plugin(PouchLiveFind)

/**
 * This class wraps the PouchDB interface to provide some methods that deal with
 * the revisions (`_rev`) automatically.
 */
class DbInterface {
  /**
   * Creates an instance of DbInterface and the main index
   * @param {String} name
   * @return {DbInterface}
   */