pouchdb-ajax
Advanced tools
Comparing version 5.4.5 to 6.0.0
@@ -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 @@ |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36925
772
+ Addedlie@3.1.0(transitive)
+ Addedpouchdb-binary-utils@6.0.0(transitive)
+ Addedpouchdb-collections@6.0.0(transitive)
+ Addedpouchdb-errors@6.0.0(transitive)
+ Addedpouchdb-md5@6.0.0(transitive)
+ Addedpouchdb-promise@6.0.0(transitive)
+ Addedpouchdb-utils@6.0.0(transitive)
- Removedacorn@1.2.25.7.4(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-types@0.8.150.9.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase62@1.2.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedes3ify@0.2.2(transitive)
- Removedesmangle-evaluator@1.0.1(transitive)
- Removedesprima@2.7.33.1.3(transitive)
- Removedesprima-fb@15001.1.0-dev-harmony-fb15001.1001.0-dev-harmony-fb(transitive)
- Removedfalafel@1.2.0(transitive)
- Removedforeach@2.0.6(transitive)
- Removedglob@5.0.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinline-process-browser@1.0.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjstransform@11.0.3(transitive)
- Removedlie@3.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpouchdb-binary-utils@5.4.5(transitive)
- Removedpouchdb-collections@1.0.1(transitive)
- Removedpouchdb-errors@5.4.5(transitive)
- Removedpouchdb-md5@5.4.5(transitive)
- Removedpouchdb-promise@5.4.5(transitive)
- Removedpouchdb-utils@5.4.5(transitive)
- Removedprivate@0.1.8(transitive)
- Removedq@1.5.1(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedrecast@0.10.430.11.23(transitive)
- Removedsource-map@0.4.40.5.7(transitive)
- Removedthrough@2.3.8(transitive)
- Removedthrough2@0.6.5(transitive)
- Removedunreachable-branch-transform@0.3.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedpouchdb-binary-utils@6.0.0
Updatedpouchdb-errors@6.0.0
Updatedpouchdb-promise@6.0.0
Updatedpouchdb-utils@6.0.0