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

pouchdb-binary-utils

Package Overview
Dependencies
Maintainers
3
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.0.7 to 6.1.0

12

lib/index.js

@@ -5,2 +5,8 @@ 'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var bufferFrom = _interopDefault(require('buffer-from'));
// ponyfill for Node <6
function thisAtob(str) {

@@ -17,8 +23,10 @@ var base64 = new Buffer(str, 'base64');

function thisBtoa(str) {
return new Buffer(str, 'binary').toString('base64');
return bufferFrom(str, 'binary').toString('base64');
}
// ponyfill for Node <6
function typedBuffer(binString, buffType, type) {
// buffType is either 'binary' or 'base64'
var buff = new Buffer(binString, buffType);
var buff = bufferFrom(binString, buffType);
buff.type = type; // non-standard, but used for consistency with the browser

@@ -25,0 +33,0 @@ return buff;

6

package.json
{
"name": "pouchdb-binary-utils",
"version": "6.0.7",
"version": "6.1.0",
"description": "PouchDB utilities for operating on binary strings and Buffers/Blobs.",

@@ -25,3 +25,5 @@ "main": "./lib/index.js",

},
"dependencies": {}
"dependencies": {
"buffer-from": "0.1.1"
}
}

@@ -0,1 +1,3 @@

import bufferFrom from 'buffer-from'; // ponyfill for Node <6
function thisAtob(str) {

@@ -12,3 +14,3 @@ var base64 = new Buffer(str, 'base64');

function thisBtoa(str) {
return new Buffer(str, 'binary').toString('base64');
return bufferFrom(str, 'binary').toString('base64');
}

@@ -19,2 +21,2 @@

thisBtoa as btoa
};
};

@@ -0,4 +1,6 @@

import bufferFrom from 'buffer-from'; // ponyfill for Node <6
function typedBuffer(binString, buffType, type) {
// buffType is either 'binary' or 'base64'
var buff = new Buffer(binString, buffType);
var buff = bufferFrom(binString, buffType);
buff.type = type; // non-standard, but used for consistency with the browser

@@ -5,0 +7,0 @@ return buff;

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