@@ -446,24 +446,24 @@ class Purgecss {
446
446
getWhitelistedSelector ( selector : string ) : Object {
447
447
if ( this . options . whitelist ) {
448
448
for ( const item of this . options . whitelist ) {
449
- const isString = typeof item === 'string'
450
- const pattern = isString ? item : item . pattern
449
+ const isString = ( typeof item === 'string' )
450
+ const pattern = ( isString ) ? item : item . pattern
451
451
452
452
// Assert the pattern match the given selector
453
453
if ( pattern === selector ) {
454
- return isString ? { pattern : pattern } : item
454
+ return ( isString ) ? { pattern : pattern } : item
455
455
}
456
456
}
457
457
}
458
458
459
459
if ( this . options . whitelistPatterns ) {
460
460
for ( const item of this . options . whitelistPatterns ) {
461
- const isRegExp = item instanceof RegExp
462
- const pattern = isRegExp ? item : item . pattern
461
+ const isRegExp = ( item instanceof RegExp )
462
+ const pattern = ( isRegExp ) ? item : item . pattern
463
463
464
464
// Assert the pattern match the given selector
465
465
if ( pattern . test ( selector ) ) {
466
- return isRegExp ? { pattern : pattern } : item
466
+ return ( isRegExp ) ? { pattern : pattern } : item
467
467
}
468
468
}
469
469
}
@@ -478,7 +478,7 @@ class Purgecss {
478
478
*/
479
479
hasSelectorKeepChildren ( selector : string ) : Object {
480
480
const whitelist = this . getWhitelistedSelector ( selector )
481
- return whitelist . hasOwnProperty ( 'keepChildren' ) ? whitelist . keepChildren : false
481
+ return ( whitelist . hasOwnProperty ( 'keepChildren' ) ) ? whitelist . keepChildren : false
482
482
}
483
483
}
484
484
0 commit comments