Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
PouchDB = require('pouchdb-core')
.plugin(require('pouchdb-adapter-http'))
.plugin(require('pouchdb-replication'))
.plugin(require('pouchdb-mapreduce'))
.plugin(require('pouchdb-find'))
.plugin(require('pouchdb-adapter-memory'));
}
else {
if(window.PouchDB) {
PouchDB = window.PouchDB;
}
else {
PouchDB = window.PouchDB = require('pouchdb-core').default
.plugin(require('pouchdb-adapter-http').default)
.plugin(require('pouchdb-replication').default)
.plugin(require('pouchdb-mapreduce').default)
.plugin(require('pouchdb-find').default)
.plugin(require('pouchdb-adapter-idb').default);
}
}
var PouchDB$1 = PouchDB;
function adapter({AbstracrAdapter}) {
const fieldsToDelete = '_id,search,timestamp'.split(',');
return class AdapterPouch extends AbstracrAdapter {
constructor($p) {
super($p);
this.props = {
_data_loaded: false,
_doc_ram_loading: false,
_doc_ram_loaded: false,
_auth: null,
.plugin(require('pouchdb-adapter-http'))
.plugin(require('pouchdb-replication'))
.plugin(require('pouchdb-mapreduce'))
.plugin(require('pouchdb-find'))
.plugin(require('pouchdb-adapter-memory'));
}
else {
if(window.PouchDB) {
PouchDB = window.PouchDB;
}
else {
//const ua = (typeof navigator !== 'undefined' && navigator.userAgent) ? navigator.userAgent.toLowerCase() : '';
PouchDB = window.PouchDB = require('pouchdb-core').default
.plugin(require('pouchdb-adapter-http').default)
.plugin(require('pouchdb-replication').default)
.plugin(require('pouchdb-mapreduce').default)
.plugin(require('pouchdb-find').default)
.plugin(require('pouchdb-adapter-idb').default);
}
}
export default PouchDB;