How to use pouchdb-mapreduce - 2 common examples

To help you get started, we’ve selected a few pouchdb-mapreduce 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 oknosoft / metadata.js / packages / metadata-pouchdb / index.js View on Github external
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,
github oknosoft / metadata.js / packages / metadata-pouchdb / src / pouchdb.js View on Github external
.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;

pouchdb-mapreduce

PouchDB's map/reduce query API as a plugin.

Apache-2.0
Latest version published 5 months ago

Package Health Score

86 / 100
Full package analysis

Popular pouchdb-mapreduce functions