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

json-bigint

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-bigint - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

19

lib/parse.js

@@ -350,4 +350,3 @@ var BigNumber = null;

text = source;
text = source + '';
at = 0;

@@ -371,12 +370,10 @@ ch = ' ';

if (value && typeof value === 'object') {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
Object.keys(value).forEach(function(k) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
});
}

@@ -383,0 +380,0 @@ return reviver.call(holder, key, value);

@@ -217,3 +217,4 @@ var BigNumber = require('bignumber.js');

partial,
value = holder[key];
value = holder[key],
isBigNumber = value instanceof BigNumber;

@@ -238,3 +239,7 @@ // If the value has a toJSON method, call it to obtain a replacement value.

case 'string':
return quote(value);
if (isBigNumber) {
return value;
} else {
return quote(value);
}

@@ -268,5 +273,2 @@ case 'number':

if (value instanceof BigNumber)
return value.toString();
// Make an array to hold the partial results of stringifying this object value.

@@ -318,10 +320,8 @@

for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
Object.keys(value).forEach(function(k) {
var v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
});
}

@@ -328,0 +328,0 @@

{
"name": "json-bigint",
"version": "0.2.0",
"version": "0.2.1",
"description": "JSON.parse with bigints support",

@@ -23,3 +23,3 @@ "main": "index.js",

"dependencies": {
"bignumber.js": "~1.1.1"
"bignumber.js": "^2.4.0"
},

@@ -26,0 +26,0 @@ "devDependencies": {

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