json-buffer
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -1,2 +0,2 @@ | ||
var Buffer = require('buffer').Buffer | ||
var bops = require('bops') | ||
@@ -8,3 +8,3 @@ //TODO: handle reviver/dehydrate function like normal | ||
exports.stringify = function stringify (o) { | ||
if(o && Buffer.isBuffer(o)) | ||
if(o && bops.is(o)) | ||
return JSON.stringify(':base64:' + o.toString('base64')) | ||
@@ -43,3 +43,3 @@ | ||
if(/^:base64:/.test(value)) | ||
return new Buffer(value.substring(8), 'base64') | ||
return bops.from(value.substring(8), 'base64') | ||
else | ||
@@ -46,0 +46,0 @@ return /^:/.test(value) ? value.substring(1) : value |
{ | ||
"name": "json-buffer", | ||
"description": "", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"homepage": "https://github.com/dominictarr/json-buffer", | ||
@@ -10,3 +10,5 @@ "repository": { | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"bops": "0.0.6" | ||
}, | ||
"devDependencies": { | ||
@@ -13,0 +15,0 @@ "tape": "~1.0.2" |
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
4201
1
+ Addedbops@0.0.6
+ Addedbase64-js@0.0.2(transitive)
+ Addedbops@0.0.6(transitive)
+ Addedto-utf8@0.0.1(transitive)