Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
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;
}
}
}
};
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
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}
*/