File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ export interface matchPatternResult {
22
22
endIndex : number ;
23
23
}
24
24
25
- const createRegExp = ( patternString : string ) : RegExp => {
25
+ export const createRegExp = ( patternString : string , defaultFlag : string = DEFAULT_FLAGS ) : RegExp => {
26
26
if ( patternString . length === 0 ) {
27
- throw new Error ( "Empty string can not includes " ) ;
27
+ throw new Error ( "Empty string can not handled " ) ;
28
28
}
29
29
if ( isRegExpString ( patternString ) ) {
30
30
const regExpStructure = parseRegExpString ( patternString ) ;
@@ -36,7 +36,7 @@ const createRegExp = (patternString: string): RegExp => {
36
36
}
37
37
throw new Error ( `"${ patternString } " can not parse as RegExp.` ) ;
38
38
} else {
39
- return new RegExp ( escapeStringRegexp ( patternString ) , DEFAULT_FLAGS ) ;
39
+ return new RegExp ( escapeStringRegexp ( patternString ) , defaultFlag ) ;
40
40
}
41
41
} ;
42
42
Original file line number Diff line number Diff line change 8
8
"target" : " es5" ,
9
9
"sourceMap" : true ,
10
10
"declaration" : true ,
11
+ "esModuleInterop" : true ,
11
12
"jsx" : " preserve" ,
12
13
"lib" : [
13
14
" es2017" ,
32
33
" .git" ,
33
34
" node_modules"
34
35
]
35
- }
36
+ }
You can’t perform that action at this time.
0 commit comments