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

pouchdb-binary-utils

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-binary-utils - npm Package Compare versions

Comparing version 6.4.3 to 7.0.0

13

lib/index-browser.es.js

@@ -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) {

17

lib/index.es.js

@@ -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;

4

package.json
{
"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",

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