json-stringify-extended
Advanced tools
+1
-1
@@ -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 @@ } |
+1
-1
| { | ||
| "name": "json-stringify-extended", | ||
| "version": "1.0.7", | ||
| "version": "2.0.0", | ||
| "dependencies": { | ||
@@ -5,0 +5,0 @@ "uglify-es": "^3.3.9" |
+10
-3
@@ -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 |
15593
0.57%294
2.44%