salesforce / kagekiri

Shadow DOM-piercing query APIs for the browser.
BSD 3-Clause "New" or "Revised" License
86 stars 9 forks source link

fix: refactor to dedupe the AST code a bit #48

Closed nolanlawson closed 4 years ago

nolanlawson commented 4 years ago

Cuts down a bit of duplicated code.

FWIW I also tested if it made sense to cache the result of postcssSelectorParser(), but in our whole test suite, running in Chrome on my MacBook, it consumed a sum total of ~3ms. So I don't think it's really worth it.