Skip to content
Snippets Groups Projects
Commit 3c25b134 authored by colemanw's avatar colemanw
Browse files

Api4Explorer - Render true/false as 1/0 in cli code

The cli interpreter doesn't do well with primitives like true/false rendered as strings,
better to use the integer equivalents.
parent 37a70901
No related branches found
No related tags found
No related merge requests found
......@@ -1065,6 +1065,7 @@
// Format string to be cli-input-safe
function cliFormat(str) {
str = str.replace(/\b(true|false)\b/g, match => match === "true" ? '1' : '0');
if (!_.includes(str, ' ') && !_.includes(str, '"') && !_.includes(str, "'")) {
return str;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment