How to use pouchdb-debug - 1 common examples

To help you get started, we’ve selected a few pouchdb-debug 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 rafi16jan / rapyd-framework / client / src / api.js View on Github external
import PouchDB from 'pouchdb-browser';
import PouchFind from 'pouchdb-find';
//import PouchSearch from 'pouchdb-quick-search';
import RelationalPouch from 'relational-pouch';

PouchDB.plugin(PouchFind);
//PouchDB.plugin(PouchSearch);
PouchDB.plugin(RelationalPouch);
PouchDB.plugin(require('pouchdb-debug').default);
window.PouchDB = PouchDB;
window.session_db = new PouchDB('session');

if (!window.rapyd_config) window.rapyd_config = {};

if (!window.localStorage.rapyd_server_url) {
  if (window.rapyd_config.url) {
    window.localStorage.rapyd_server_url = window.rapyd_config.url;
  }
  else if (window.location.protocol === 'file:') {
    window.localStorage.rapyd_server_url = 'http://localhost:8069';
  }
  else {
    window.localStorage.rapyd_server_url = ((href) => href.substring(0, href.lastIndexOf('/')) + '/')(window.location.origin + window.location.pathname);
  }
}

pouchdb-debug

PouchDB.debug() API to debug PouchDB operations

Apache-2.0
Latest version published 5 years ago

Package Health Score

75 / 100
Full package analysis

Popular pouchdb-debug functions

Similar packages