File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ export const toJson = (
5050 return originalStringify ( value , replacer as never , space ) ;
5151 }
5252
53- const bigInts = / ( [ \[ : ] ) ? " ( - ? \d + ) n " ( $ | ( [ \n ] | \s ) * ( \s | [ \n ] ) * [ , \} \] ] ) / g;
54- const noise = / ( [ \[ : ] ) ? ( " - ? \d + n + ) n ( " $ | " ( [ \n ] | \s ) * ( \s | [ \n ] ) * [ , \} \] ] ) / g;
53+ const bigInts = / ( [ \[ : ] ) ? " ( - ? \d + ) n " ( $ | \s * [ , \} \] ] ) / g;
54+ const noise = / ( [ \[ : ] ) ? ( " - ? \d + n + ) n ( " $ | " \s * [ , \} \] ] ) / g;
5555 const convertedToCustomJSON = originalStringify (
5656 value ,
5757 ( key , val ) => {
@@ -105,7 +105,7 @@ export function fromJson<T = unknown>(
105105
106106 const MAX_INT = Number . MAX_SAFE_INTEGER . toString ( ) ;
107107 const MAX_DIGITS = MAX_INT . length ;
108- const stringsOrLargeNumbers = / " (?: \\ . | [ ^ " ] ) * " | - ? ( 0 | [ 1 - 9 ] [ 0 - 9 ] * ) ( \. [ 0 - 9 ] + ) ? ( [ e E ] [ + - ] ? [ 0 - 9 ] + ) ? / g;
108+ const stringsOrLargeNumbers = / " (?: [ ^ " \\ ] | \\ . ) * " | - ? ( 0 | [ 1 - 9 ] [ 0 - 9 ] * ) ( \. [ 0 - 9 ] + ) ? ( [ e E ] [ + - ] ? [ 0 - 9 ] + ) ? / g;
109109 const noiseValueWithQuotes = / ^ " - ? \d + n + " $ / ; // Noise - strings that match the custom format before being converted to it
110110 const customFormat = / ^ - ? \d + n $ / ;
111111
You can’t perform that action at this time.
0 commit comments