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

pouchdb-all-dbs

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-all-dbs - npm Package Compare versions

Comparing version 0.1.6 to 1.0.0

3

bin/test-browser.js

@@ -56,5 +56,6 @@ #!/usr/bin/env node

client.browser !== 'firefox' &&
client.browser !== 'phantomjs' &&
process.env.TRAVIS_SECURE_ENV_VARS === 'false') {
console.error('Not running test, cannot connect to saucelabs');
process.exit(0);
process.exit(1);
return;

@@ -61,0 +62,0 @@ }

{
"name": "pouchdb-all-dbs",
"main": "dist/pouchdb.all-dbs.js",
"version": "0.1.6",
"version": "1.0.0",
"homepage": "https://github.com/nolanlawson/pouchdb-all-dbs",

@@ -6,0 +6,0 @@ "authors": [

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

var pouch;
var cache;
var queue = new TaskQueue();

@@ -77,2 +78,5 @@

}).then(function () {
if (cache) {
cache[dbName] = true;
}
callback();

@@ -99,2 +103,5 @@ }, callback);

}).then(function () {
if (cache) {
delete cache[dbName];
}
callback();

@@ -108,7 +115,15 @@ }, callback);

queue.add(function (callback) {
if (cache) {
return callback(null, Object.keys(cache).map(unprefixed));
}
// older versions of this module didn't have prefixes, so check here
var opts = {startkey: PREFIX, endkey: (PREFIX + '\uffff')};
pouch.allDocs(opts).then(function (res) {
var dbs = res.rows.map(function (row) {
return unprefixed(row.key);
cache = {};
var dbs = [];
res.rows.forEach(function (row) {
dbs.push(unprefixed(row.key));
cache[row.key] = true;
});

@@ -127,2 +142,3 @@ callback(null, dbs);

pouch = null;
cache = null;
callback();

@@ -129,0 +145,0 @@ }).catch(function (err) {

{
"name": "pouchdb-all-dbs",
"version": "0.1.6",
"version": "1.0.0",
"description": "PouchDB allDbs plugin",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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