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

pouchdb-ajax

Package Overview
Dependencies
Maintainers
5
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-ajax - npm Package Compare versions

Comparing version 5.4.5 to 6.0.0

24

lib/index-browser.js

@@ -11,2 +11,4 @@ 'use strict';

/* global fetch */
/* global Headers */
function wrappedFetch() {

@@ -119,2 +121,3 @@ var wrappedPromise = {};

xhr.abort();
cleanUp();
};

@@ -125,4 +128,20 @@

xhr.abort();
cleanUp();
};
var ret = {abort: abortReq};
var cleanUp = function () {
clearTimeout(timer);
ret.abort = function () {};
if (xhr) {
xhr.onprogress = undefined;
if (xhr.upload) {
xhr.upload.onprogress = undefined;
}
xhr.onreadystatechange = undefined;
xhr = undefined;
}
};
if (options.xhr) {

@@ -207,3 +226,3 @@ xhr = new options.xhr();

err.code = 'ETIMEDOUT';
} else {
} else if (typeof xhr.response === 'string') {
try {

@@ -216,2 +235,3 @@ err = JSON.parse(xhr.response);

}
cleanUp();
};

@@ -227,3 +247,3 @@

return {abort: abortReq};
return ret;
}

@@ -230,0 +250,0 @@

10

package.json
{
"name": "pouchdb-ajax",
"version": "5.4.5",
"version": "6.0.0",
"description": "PouchDB's ajax() method.",

@@ -27,8 +27,8 @@ "main": "./lib/index.js",

"js-extend": "1.0.1",
"pouchdb-binary-utils": "5.4.5",
"pouchdb-errors": "5.4.5",
"pouchdb-promise": "5.4.5",
"pouchdb-utils": "5.4.5",
"pouchdb-binary-utils": "6.0.0",
"pouchdb-errors": "6.0.0",
"pouchdb-promise": "6.0.0",
"pouchdb-utils": "6.0.0",
"request": "2.72.0"
}
}

@@ -113,2 +113,3 @@ /* global fetch */

xhr.abort();
cleanUp();
};

@@ -119,4 +120,20 @@

xhr.abort();
cleanUp();
};
var ret = {abort: abortReq};
var cleanUp = function () {
clearTimeout(timer);
ret.abort = function () {};
if (xhr) {
xhr.onprogress = undefined;
if (xhr.upload) {
xhr.upload.onprogress = undefined;
}
xhr.onreadystatechange = undefined;
xhr = undefined;
}
};
if (options.xhr) {

@@ -201,3 +218,3 @@ xhr = new options.xhr();

err.code = 'ETIMEDOUT';
} else {
} else if (typeof xhr.response === 'string') {
try {

@@ -210,2 +227,3 @@ err = JSON.parse(xhr.response);

}
cleanUp();
};

@@ -221,3 +239,3 @@

return {abort: abortReq};
return ret;
}

@@ -224,0 +242,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