@@ -5,16 +5,16 @@ const escOpen = '\0OPEN' + Math.random() + '\0'
5
5
const escClose = '\0CLOSE' + Math . random ( ) + '\0'
6
6
const escComma = '\0COMMA' + Math . random ( ) + '\0'
7
7
const escPeriod = '\0PERIOD' + Math . random ( ) + '\0'
8
- const escSlashPattern = new RegExp ( escSlash , 'g' ) ;
9
- const escOpenPattern = new RegExp ( escOpen , 'g' ) ;
10
- const escClosePattern = new RegExp ( escClose , 'g' ) ;
11
- const escCommaPattern = new RegExp ( escComma , 'g' ) ;
12
- const escPeriodPattern = new RegExp ( escPeriod , 'g' ) ;
13
- const slashPattern = / \\ \\ / g;
14
- const openPattern = / \\ { / g;
15
- const closePattern = / \\ } / g;
16
- const commaPattern = / \\ , / g;
17
- const periodPattern = / \\ ./ g;
8
+ const escSlashPattern = new RegExp ( escSlash , 'g' )
9
+ const escOpenPattern = new RegExp ( escOpen , 'g' )
10
+ const escClosePattern = new RegExp ( escClose , 'g' )
11
+ const escCommaPattern = new RegExp ( escComma , 'g' )
12
+ const escPeriodPattern = new RegExp ( escPeriod , 'g' )
13
+ const slashPattern = / \\ \\ / g
14
+ const openPattern = / \\ { / g
15
+ const closePattern = / \\ } / g
16
+ const commaPattern = / \\ , / g
17
+ const periodPattern = / \\ ./ g
18
18
19
19
/**
20
20
* @return {number }
@@ -33,7 +33,7 @@ function escapeBraces (str) {
33
33
. replace ( openPattern , escOpen )
34
34
. replace ( closePattern , escClose )
35
35
. replace ( commaPattern , escComma )
36
- . replace ( periodPattern , escPeriod ) ;
36
+ . replace ( periodPattern , escPeriod )
37
37
}
38
38
39
39
/**
@@ -44,7 +44,7 @@ function unescapeBraces (str) {
44
44
. replace ( escOpenPattern , '{' )
45
45
. replace ( escClosePattern , '}' )
46
46
. replace ( escCommaPattern , ',' )
47
- . replace ( escPeriodPattern , '.' ) ;
47
+ . replace ( escPeriodPattern , '.' )
48
48
}
49
49
50
50
/**
0 commit comments