Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

json-stringify-extended

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-stringify-extended - npm Package Compare versions

Comparing version
1.0.7
to
2.0.0
+1
-1
main.js

@@ -217,3 +217,3 @@

if ((options.discard || options.compress) && (value === undefined || value === null)) {
if ((options.discard) && (value === undefined || value === null)) {
return null

@@ -220,0 +220,0 @@ }

{
"name": "json-stringify-extended",
"version": "1.0.7",
"version": "2.0.0",
"dependencies": {

@@ -5,0 +5,0 @@ "uglify-es": "^3.3.9"

@@ -146,5 +146,5 @@ # json-stringify-extended

Compress data for ``function`` and ``Date`` discard ``null`` and ``undefined`` values, and keep spaces and useless quotes.
Compress data for ``function`` and ``Date``.
Note: in version < `2.0.0` also discard ``null`` and ``undefined`` values.
##### options.filter

@@ -247,3 +247,3 @@ Type: `function(key:string, value:string) return boolean`

Add a space between key:` and `value`.
Add a space between `key:` and `value`.

@@ -258,2 +258,9 @@ ##### options.discard

## Changelog
#### v. 2.0.0
- separate `compress` and `discard` option (to keep object keys on compress)
---
## TODO

@@ -260,0 +267,0 @@ - [ ] output compatibility: es5, es6