File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ var booleanValueOf = Boolean.prototype.valueOf;
16
16
var objectToString = Object . prototype . toString ;
17
17
var functionToString = Function . prototype . toString ;
18
18
var match = String . prototype . match ;
19
+ var test = RegExp . prototype . test ;
19
20
var bigIntValueOf = typeof BigInt === 'function' ? BigInt . prototype . valueOf : null ;
20
21
var gOPS = Object . getOwnPropertySymbols ;
21
22
var symToString = typeof Symbol === 'function' && typeof Symbol . iterator === 'symbol' ? Symbol . prototype . toString : null ;
@@ -454,7 +455,7 @@ function arrObjKeys(obj, inspect) {
454
455
if ( hasShammedSymbols && symMap [ '$' + key ] instanceof Symbol ) {
455
456
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
456
457
continue ; // eslint-disable-line no-restricted-syntax, no-continue
457
- } else if ( ( / [ ^ \w $ ] / ) . test ( key ) ) {
458
+ } else if ( test . call ( / [ ^ \w $ ] / , key ) ) {
458
459
xs . push ( inspect ( key , obj ) + ': ' + inspect ( obj [ key ] , obj ) ) ;
459
460
} else {
460
461
xs . push ( key + ': ' + inspect ( obj [ key ] , obj ) ) ;
You can’t perform that action at this time.
0 commit comments