File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,10 @@ const functions = (() => {
131131 arg = arg [ 0 ] ;
132132 }
133133 str = JSON . stringify ( arg , function ( key , val ) {
134- return ( typeof val !== 'undefined' && val !== null && val . toPrecision && isNumeric ( val ) ) ? Number ( val . toPrecision ( 15 ) ) :
135- ( val && isFunction ( val ) ) ? '' : val ;
134+ if ( typeof val !== 'undefined' && val !== null && isNumeric ( val ) ) {
135+ return val . toPrecision && ! Number . isInteger ( val ) ? Number ( val . toPrecision ( 15 ) ) : val ;
136+ }
137+ return val && isFunction ( val ) ? '' : val ;
136138 } , space ) ;
137139 }
138140 return str ;
Original file line number Diff line number Diff line change 1+ {
2+ "expr" : " $formatBase(big_id)" ,
3+ "data" : { "big_id" : 5890840712243076 },
4+ "bindings" : {},
5+ "result" : " 5890840712243076"
6+ }
Original file line number Diff line number Diff line change 1+ {
2+ "expr" : " $string(big_id)" ,
3+ "data" : { "big_id" : 5890840712243076 },
4+ "bindings" : {},
5+ "result" : " 5890840712243076"
6+ }
You can’t perform that action at this time.
0 commit comments