pouchdb-binary-utils
Advanced tools
Comparing version 8.0.1 to 9.0.0
@@ -47,3 +47,3 @@ var thisAtob = function (str) { | ||
function binStringToBluffer(binString, type) { | ||
return createBlob([binaryStringToArrayBuffer(binString)], {type: type}); | ||
return createBlob([binaryStringToArrayBuffer(binString)], {type}); | ||
} | ||
@@ -50,0 +50,0 @@ |
@@ -51,3 +51,3 @@ 'use strict'; | ||
function binStringToBluffer(binString, type) { | ||
return createBlob([binaryStringToArrayBuffer(binString)], {type: type}); | ||
return createBlob([binaryStringToArrayBuffer(binString)], {type}); | ||
} | ||
@@ -54,0 +54,0 @@ |
@@ -1,5 +0,3 @@ | ||
import bufferFrom from 'buffer-from'; | ||
function thisAtob(str) { | ||
var base64 = new Buffer(str, 'base64'); | ||
var base64 = Buffer.from(str, 'base64'); | ||
// Node.js will just skip the characters it can't decode instead of | ||
@@ -14,3 +12,3 @@ // throwing an exception | ||
function thisBtoa(str) { | ||
return bufferFrom(str, 'binary').toString('base64'); | ||
return Buffer.from(str, 'binary').toString('base64'); | ||
} | ||
@@ -20,3 +18,3 @@ | ||
// buffType is either 'binary' or 'base64' | ||
var buff = bufferFrom(binString, buffType); | ||
const buff = Buffer.from(binString, buffType); | ||
buff.type = type; // non-standard, but used for consistency with the browser | ||
@@ -23,0 +21,0 @@ return buff; |
@@ -5,8 +5,4 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var bufferFrom = _interopDefault(require('buffer-from')); | ||
function thisAtob(str) { | ||
var base64 = new Buffer(str, 'base64'); | ||
var base64 = Buffer.from(str, 'base64'); | ||
// Node.js will just skip the characters it can't decode instead of | ||
@@ -21,3 +17,3 @@ // throwing an exception | ||
function thisBtoa(str) { | ||
return bufferFrom(str, 'binary').toString('base64'); | ||
return Buffer.from(str, 'binary').toString('base64'); | ||
} | ||
@@ -27,3 +23,3 @@ | ||
// buffType is either 'binary' or 'base64' | ||
var buff = bufferFrom(binString, buffType); | ||
const buff = Buffer.from(binString, buffType); | ||
buff.type = type; // non-standard, but used for consistency with the browser | ||
@@ -30,0 +26,0 @@ return buff; |
{ | ||
"name": "pouchdb-binary-utils", | ||
"version": "8.0.1", | ||
"version": "9.0.0", | ||
"description": "PouchDB utilities for operating on binary strings and Buffers/Blobs.", | ||
@@ -14,3 +14,3 @@ "main": "./lib/index.js", | ||
}, | ||
"jsnext:main": "./lib/index.es.js", | ||
"module": "./lib/index.es.js", | ||
"browser": { | ||
@@ -20,11 +20,7 @@ "./lib/index.js": "./lib/index-browser.js", | ||
}, | ||
"dependencies": { | ||
"buffer-from": "1.1.2" | ||
}, | ||
"module": "./lib/index.es.js", | ||
"dependencies": {}, | ||
"files": [ | ||
"lib", | ||
"dist", | ||
"tonic-example.js" | ||
"dist" | ||
] | ||
} |
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
0
26241
394
- Removedbuffer-from@1.1.2
- Removedbuffer-from@1.1.2(transitive)