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

json-buffer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-buffer - npm Package Compare versions

Comparing version 2.0.11 to 3.0.0

7

index.js

@@ -6,2 +6,4 @@ //TODO: handle reviver/dehydrate function like normal

exports.stringify = function stringify (o) {
if('undefined' == typeof o) return o
if(o && Buffer.isBuffer(o))

@@ -26,3 +28,6 @@ return JSON.stringify(':base64:' + o.toString('base64'))

if (array) {
s += stringify(o[k])
if(o[k] == undefined)
s += 'null'
else
s += stringify(o[k])
} else if (o[k] !== void(0)) {

@@ -29,0 +34,0 @@ s += stringify(k) + ':' + stringify(o[k])

4

package.json
{
"name": "json-buffer",
"description": "JSON parse & stringify that supports binary via bops & base64",
"version": "2.0.11",
"version": "3.0.0",
"homepage": "https://github.com/dominictarr/json-buffer",

@@ -11,3 +11,3 @@ "repository": {

"devDependencies": {
"tape": "~1.0.2"
"tape": "^4.6.3"
},

@@ -14,0 +14,0 @@ "scripts": {

@@ -42,3 +42,4 @@

fn: function () {}
}
},
undefined: undefined
}

@@ -50,5 +51,10 @@

var s = _JSON.stringify(value)
console.log(s)
var _value = _JSON.parse(s)
t.deepEqual(clone(_value), clone(value))
console.log('parse', s)
if(JSON.stringify(value) !== undefined) {
console.log(s)
var _value = _JSON.parse(s)
t.deepEqual(clone(_value), clone(value))
}
else
t.equal(s, undefined)
t.end()

@@ -58,1 +64,3 @@ })

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