Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pouchdb-adapter-leveldb-core

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-adapter-leveldb-core - npm Package Compare versions

Comparing version 6.4.3 to 7.0.0

31

lib/index-browser.es.js
import { blob, readAsBinaryString, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils';
import { Set, Map } from 'pouchdb-collections';
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils';
import Promise from 'pouchdb-promise';
import levelup from 'levelup';

@@ -34,7 +33,2 @@ import sublevel from 'sublevel-pouchdb';

// similar to an idb or websql transaction object
// designed to be passed around. basically just caches
// things in-memory and then does a big batch() operation
// when you're done
function getCacheFor(transaction, store) {

@@ -514,3 +508,3 @@ var prefix = store.prefix()[0];

}
var newDoc = parseDoc(doc, newEdits);
var newDoc = parseDoc(doc, newEdits, api.__opts);

@@ -1088,15 +1082,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) {

var returnDocs;
if ('return_docs' in opts) {
returnDocs = opts.return_docs;
} else if ('returnDocs' in opts) {
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release
returnDocs = opts.returnDocs;
} else {
returnDocs = true;
}
function complete() {
opts.done = true;
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1110,3 +1094,3 @@ if (opts.limit < results.length) {

if (!opts.continuous && !opts.cancelled) {
if (opts.include_docs && opts.attachments) {
if (opts.include_docs && opts.attachments && opts.return_docs) {
fetchAttachments(results, stores, opts).then(function () {

@@ -1170,3 +1154,3 @@ opts.complete(null, {results: results, last_seq: lastSeq});

if (returnDocs) {
if (opts.return_docs) {
results.push(change);

@@ -1216,3 +1200,3 @@ }

}
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1566,3 +1550,6 @@ if (opts.limit < results.length) {

function callDestroy(name, cb) {
leveldown.destroy(name, cb);
// May not exist if leveldown is backed by memory adapter
if ('destroy' in leveldown) {
leveldown.destroy(name, cb);
}
}

@@ -1569,0 +1556,0 @@ }

@@ -8,3 +8,2 @@ 'use strict';

var pouchdbUtils = require('pouchdb-utils');
var Promise = _interopDefault(require('pouchdb-promise'));
var levelup = _interopDefault(require('levelup'));

@@ -39,7 +38,2 @@ var sublevel = _interopDefault(require('sublevel-pouchdb'));

// similar to an idb or websql transaction object
// designed to be passed around. basically just caches
// things in-memory and then does a big batch() operation
// when you're done
function getCacheFor(transaction, store) {

@@ -519,3 +513,3 @@ var prefix = store.prefix()[0];

}
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits);
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits, api.__opts);

@@ -1093,15 +1087,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) {

var returnDocs;
if ('return_docs' in opts) {
returnDocs = opts.return_docs;
} else if ('returnDocs' in opts) {
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release
returnDocs = opts.returnDocs;
} else {
returnDocs = true;
}
function complete() {
opts.done = true;
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1115,3 +1099,3 @@ if (opts.limit < results.length) {

if (!opts.continuous && !opts.cancelled) {
if (opts.include_docs && opts.attachments) {
if (opts.include_docs && opts.attachments && opts.return_docs) {
fetchAttachments(results, stores, opts).then(function () {

@@ -1175,3 +1159,3 @@ opts.complete(null, {results: results, last_seq: lastSeq});

if (returnDocs) {
if (opts.return_docs) {
results.push(change);

@@ -1221,3 +1205,3 @@ }

}
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1571,3 +1555,6 @@ if (opts.limit < results.length) {

function callDestroy(name, cb) {
leveldown.destroy(name, cb);
// May not exist if leveldown is backed by memory adapter
if ('destroy' in leveldown) {
leveldown.destroy(name, cb);
}
}

@@ -1574,0 +1561,0 @@ }

import { typedBuffer, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils';
import { Set, Map } from 'pouchdb-collections';
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils';
import Promise from 'pouchdb-promise';
import levelup from 'levelup';

@@ -32,7 +31,2 @@ import sublevel from 'sublevel-pouchdb';

// similar to an idb or websql transaction object
// designed to be passed around. basically just caches
// things in-memory and then does a big batch() operation
// when you're done
function getCacheFor(transaction, store) {

@@ -512,3 +506,3 @@ var prefix = store.prefix()[0];

}
var newDoc = parseDoc(doc, newEdits);
var newDoc = parseDoc(doc, newEdits, api.__opts);

@@ -1086,15 +1080,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) {

var returnDocs;
if ('return_docs' in opts) {
returnDocs = opts.return_docs;
} else if ('returnDocs' in opts) {
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release
returnDocs = opts.returnDocs;
} else {
returnDocs = true;
}
function complete() {
opts.done = true;
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1108,3 +1092,3 @@ if (opts.limit < results.length) {

if (!opts.continuous && !opts.cancelled) {
if (opts.include_docs && opts.attachments) {
if (opts.include_docs && opts.attachments && opts.return_docs) {
fetchAttachments(results, stores, opts).then(function () {

@@ -1168,3 +1152,3 @@ opts.complete(null, {results: results, last_seq: lastSeq});

if (returnDocs) {
if (opts.return_docs) {
results.push(change);

@@ -1214,3 +1198,3 @@ }

}
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1564,3 +1548,6 @@ if (opts.limit < results.length) {

function callDestroy(name, cb) {
leveldown.destroy(name, cb);
// May not exist if leveldown is backed by memory adapter
if ('destroy' in leveldown) {
leveldown.destroy(name, cb);
}
}

@@ -1567,0 +1554,0 @@ }

@@ -8,3 +8,2 @@ 'use strict';

var pouchdbUtils = require('pouchdb-utils');
var Promise = _interopDefault(require('pouchdb-promise'));
var levelup = _interopDefault(require('levelup'));

@@ -37,7 +36,2 @@ var sublevel = _interopDefault(require('sublevel-pouchdb'));

// similar to an idb or websql transaction object
// designed to be passed around. basically just caches
// things in-memory and then does a big batch() operation
// when you're done
function getCacheFor(transaction, store) {

@@ -517,3 +511,3 @@ var prefix = store.prefix()[0];

}
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits);
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits, api.__opts);

@@ -1091,15 +1085,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) {

var returnDocs;
if ('return_docs' in opts) {
returnDocs = opts.return_docs;
} else if ('returnDocs' in opts) {
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release
returnDocs = opts.returnDocs;
} else {
returnDocs = true;
}
function complete() {
opts.done = true;
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1113,3 +1097,3 @@ if (opts.limit < results.length) {

if (!opts.continuous && !opts.cancelled) {
if (opts.include_docs && opts.attachments) {
if (opts.include_docs && opts.attachments && opts.return_docs) {
fetchAttachments(results, stores, opts).then(function () {

@@ -1173,3 +1157,3 @@ opts.complete(null, {results: results, last_seq: lastSeq});

if (returnDocs) {
if (opts.return_docs) {
results.push(change);

@@ -1219,3 +1203,3 @@ }

}
if (returnDocs && opts.limit) {
if (opts.return_docs && opts.limit) {
/* istanbul ignore if */

@@ -1569,3 +1553,6 @@ if (opts.limit < results.length) {

function callDestroy(name, cb) {
leveldown.destroy(name, cb);
// May not exist if leveldown is backed by memory adapter
if ('destroy' in leveldown) {
leveldown.destroy(name, cb);
}
}

@@ -1572,0 +1559,0 @@ }

{
"name": "pouchdb-adapter-leveldb-core",
"version": "6.4.3",
"version": "7.0.0",
"description": "Core PouchDB adapter code for LevelDOWN-based adapters",

@@ -17,15 +17,14 @@ "main": "./lib/index.js",

"argsarray": "0.0.1",
"buffer-from": "0.1.1",
"buffer-from": "1.1.0",
"double-ended-queue": "2.1.0-0",
"levelup": "2.0.1",
"pouchdb-adapter-utils": "6.4.3",
"pouchdb-binary-utils": "6.4.3",
"pouchdb-collections": "6.4.3",
"pouchdb-errors": "6.4.3",
"pouchdb-json": "6.4.3",
"pouchdb-md5": "6.4.3",
"pouchdb-merge": "6.4.3",
"pouchdb-promise": "6.4.3",
"pouchdb-utils": "6.4.3",
"sublevel-pouchdb": "6.4.3",
"levelup": "3.0.1",
"pouchdb-adapter-utils": "7.0.0",
"pouchdb-binary-utils": "7.0.0",
"pouchdb-collections": "7.0.0",
"pouchdb-errors": "7.0.0",
"pouchdb-json": "7.0.0",
"pouchdb-md5": "7.0.0",
"pouchdb-merge": "7.0.0",
"pouchdb-utils": "7.0.0",
"sublevel-pouchdb": "7.0.0",
"through2": "2.0.3"

@@ -32,0 +31,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc