mirror of
https://github.com/gchq/CyberChef
synced 2024-12-26 12:33:11 +00:00
JSON Beautify and Minify operations no longer throw an error on empty input. Fixes #29
This commit is contained in:
parent
19b0a972d8
commit
fc9d0a63c2
5 changed files with 12 additions and 10 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -64,6 +64,7 @@ var Code = {
|
|||
*/
|
||||
run_json_beautify: function(input, args) {
|
||||
var indent_str = args[0];
|
||||
if (!input) return "";
|
||||
return vkbeautify.json(input, indent_str);
|
||||
},
|
||||
|
||||
|
@ -121,6 +122,7 @@ var Code = {
|
|||
* @returns {string}
|
||||
*/
|
||||
run_json_minify: function(input, args) {
|
||||
if (!input) return "";
|
||||
return vkbeautify.jsonmin(input);
|
||||
},
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
203 source files
|
||||
104209 lines
|
||||
104211 lines
|
||||
4.0M size
|
||||
|
||||
136 JavaScript source files
|
||||
95119 lines
|
||||
95121 lines
|
||||
3.4M size
|
||||
|
||||
78 third party JavaScript source files
|
||||
|
@ -11,7 +11,7 @@
|
|||
2.7M size
|
||||
|
||||
58 first party JavaScript source files
|
||||
18742 lines
|
||||
18744 lines
|
||||
724K size
|
||||
|
||||
3.1M uncompressed JavaScript size
|
||||
|
|
Loading…
Reference in a new issue