File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ const features = {
25
25
// Storage for fixed/extended native methods
26
26
const fixed = { } ;
27
27
// Storage for regexes cached by `XRegExp.cache`
28
- let regexCache = { } ;
28
+ let regexCache = Object . create ( null ) ;
29
29
// Storage for pattern details cached by the `XRegExp` constructor
30
- let patternCache = { } ;
30
+ let patternCache = Object . create ( null ) ;
31
31
// Storage for regex syntax tokens added internally or by `XRegExp.addToken`
32
32
const tokens = [ ] ;
33
33
// Token scopes
@@ -774,10 +774,10 @@ XRegExp.cache = (pattern, flags) => {
774
774
XRegExp . cache . flush = ( cacheName ) => {
775
775
if ( cacheName === 'patterns' ) {
776
776
// Flush the pattern cache used by the `XRegExp` constructor
777
- patternCache = { } ;
777
+ patternCache = Object . create ( null ) ;
778
778
} else {
779
779
// Flush the regex cache populated by `XRegExp.cache`
780
- regexCache = { } ;
780
+ regexCache = Object . create ( null ) ;
781
781
}
782
782
} ;
783
783
You can’t perform that action at this time.
0 commit comments