pouchdb-binary-utils
Advanced tools
Comparing version 6.4.3 to 7.0.0
@@ -69,9 +69,2 @@ var thisAtob = function (str) { | ||
function readAsBinaryString(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(arrayBufferToBinaryString( | ||
new FileReaderSync().readAsArrayBuffer(blob))); | ||
} | ||
var reader = new FileReader(); | ||
@@ -107,8 +100,2 @@ var hasBinaryString = typeof reader.readAsBinaryString === 'function'; | ||
function readAsArrayBuffer(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker: | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(new FileReaderSync().readAsArrayBuffer(blob)); | ||
} | ||
var reader = new FileReader(); | ||
@@ -115,0 +102,0 @@ reader.onloadend = function (e) { |
@@ -73,9 +73,2 @@ 'use strict'; | ||
function readAsBinaryString(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(arrayBufferToBinaryString( | ||
new FileReaderSync().readAsArrayBuffer(blob))); | ||
} | ||
var reader = new FileReader(); | ||
@@ -111,8 +104,2 @@ var hasBinaryString = typeof reader.readAsBinaryString === 'function'; | ||
function readAsArrayBuffer(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker: | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(new FileReaderSync().readAsArrayBuffer(blob)); | ||
} | ||
var reader = new FileReader(); | ||
@@ -119,0 +106,0 @@ reader.onloadend = function (e) { |
@@ -54,3 +54,3 @@ import bufferFrom from 'buffer-from'; | ||
// not used in Node, but here for completeness | ||
function blobToBase64$2(blobOrBuffer, callback) { | ||
function blobToBase64$1(blobOrBuffer, callback) { | ||
callback(blobOrBuffer.toString('binary')); | ||
@@ -61,8 +61,2 @@ } | ||
function readAsArrayBuffer(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker: | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(new FileReaderSync().readAsArrayBuffer(blob)); | ||
} | ||
var reader = new FileReader(); | ||
@@ -91,9 +85,2 @@ reader.onloadend = function (e) { | ||
function readAsBinaryString(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(arrayBufferToBinaryString( | ||
new FileReaderSync().readAsArrayBuffer(blob))); | ||
} | ||
var reader = new FileReader(); | ||
@@ -115,2 +102,2 @@ var hasBinaryString = typeof reader.readAsBinaryString === 'function'; | ||
export { thisAtob as atob, thisBtoa as btoa, b64ToBluffer as base64StringToBlobOrBuffer, binaryStringToArrayBuffer, binStringToBluffer as binaryStringToBlobOrBuffer, createBlob as blob, blobToBase64 as blobOrBufferToBase64, blobToBase64$2 as blobOrBufferToBinaryString, readAsArrayBuffer, readAsBinaryString, typedBuffer }; | ||
export { thisAtob as atob, thisBtoa as btoa, b64ToBluffer as base64StringToBlobOrBuffer, binaryStringToArrayBuffer, binStringToBluffer as binaryStringToBlobOrBuffer, createBlob as blob, blobToBase64 as blobOrBufferToBase64, blobToBase64$1 as blobOrBufferToBinaryString, readAsArrayBuffer, readAsBinaryString, typedBuffer }; |
@@ -60,3 +60,3 @@ 'use strict'; | ||
// not used in Node, but here for completeness | ||
function blobToBase64$2(blobOrBuffer, callback) { | ||
function blobToBase64$1(blobOrBuffer, callback) { | ||
callback(blobOrBuffer.toString('binary')); | ||
@@ -67,8 +67,2 @@ } | ||
function readAsArrayBuffer(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker: | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(new FileReaderSync().readAsArrayBuffer(blob)); | ||
} | ||
var reader = new FileReader(); | ||
@@ -97,9 +91,2 @@ reader.onloadend = function (e) { | ||
function readAsBinaryString(blob, callback) { | ||
if (typeof FileReader === 'undefined') { | ||
// fix for Firefox in a web worker | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=901097 | ||
return callback(arrayBufferToBinaryString( | ||
new FileReaderSync().readAsArrayBuffer(blob))); | ||
} | ||
var reader = new FileReader(); | ||
@@ -128,5 +115,5 @@ var hasBinaryString = typeof reader.readAsBinaryString === 'function'; | ||
exports.blobOrBufferToBase64 = blobToBase64; | ||
exports.blobOrBufferToBinaryString = blobToBase64$2; | ||
exports.blobOrBufferToBinaryString = blobToBase64$1; | ||
exports.readAsArrayBuffer = readAsArrayBuffer; | ||
exports.readAsBinaryString = readAsBinaryString; | ||
exports.typedBuffer = typedBuffer; |
{ | ||
"name": "pouchdb-binary-utils", | ||
"version": "6.4.3", | ||
"version": "7.0.0", | ||
"description": "PouchDB utilities for operating on binary strings and Buffers/Blobs.", | ||
@@ -16,3 +16,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"buffer-from": "0.1.1" | ||
"buffer-from": "1.1.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "module": "./lib/index.es.js", |
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
26446
397
+ Addedbuffer-from@1.1.0(transitive)
- Removedattempt-x@1.1.3(transitive)
- Removedbuffer-from@0.1.1(transitive)
- Removedcached-constructors-x@1.0.2(transitive)
- Removedhas-own-property-x@3.2.0(transitive)
- Removedhas-symbol-support-x@1.4.2(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-to-string-tag-x@1.4.1(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedinfinity-x@1.0.2(transitive)
- Removedis-array-buffer-x@1.7.0(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-falsey-x@1.0.3(transitive)
- Removedis-finite-x@3.0.4(transitive)
- Removedis-function-x@3.3.0(transitive)
- Removedis-index-x@1.1.0(transitive)
- Removedis-nan-x@1.0.3(transitive)
- Removedis-nil-x@1.4.2(transitive)
- Removedis-object-like-x@1.7.1(transitive)
- Removedis-primitive@2.0.03.0.1(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedlodash.isnull@3.0.0(transitive)
- Removedmath-clamp-x@1.2.0(transitive)
- Removedmath-sign-x@3.0.0(transitive)
- Removedmax-safe-integer@1.0.1(transitive)
- Removednan-x@1.0.2(transitive)
- Removednormalize-space-x@3.0.0(transitive)
- Removedobject-get-own-property-descriptor-x@3.2.0(transitive)
- Removedparse-int-x@2.0.0(transitive)
- Removedproperty-is-enumerable-x@1.1.0(transitive)
- Removedreplace-comments-x@2.0.0(transitive)
- Removedrequire-coercible-to-string-x@1.0.2(transitive)
- Removedrequire-object-coercible-x@1.4.3(transitive)
- Removedto-boolean-x@1.0.3(transitive)
- Removedto-integer-x@3.0.0(transitive)
- Removedto-number-x@2.0.0(transitive)
- Removedto-object-x@1.5.0(transitive)
- Removedto-primitive-x@1.1.0(transitive)
- Removedto-property-key-x@2.0.2(transitive)
- Removedto-string-symbols-supported-x@1.0.2(transitive)
- Removedto-string-tag-x@1.4.3(transitive)
- Removedto-string-x@1.4.5(transitive)
- Removedtrim-left-x@3.0.0(transitive)
- Removedtrim-right-x@3.0.0(transitive)
- Removedtrim-x@3.0.0(transitive)
- Removedvalidate.io-undefined@1.0.3(transitive)
- Removedwhite-space-x@3.0.1(transitive)
Updatedbuffer-from@1.1.0