CSS Selector Parser

JSON →
library 3.3.0 ·javascript
verified May 27, 2026

css-selector-parser is a high-performance JavaScript/TypeScript library designed for parsing CSS selectors into a comprehensive Abstract Syntax Tree (AST). It provides an AST-based object model that enables programmatic manipulation, analysis, and transformation of selectors through its visitor pattern implementation. The library offers full compliance with a wide array of CSS selector specifications, including CSS1, CSS2, CSS3, and Selectors Level 4, with an additional "progressive" mode for handling unknown or future pseudo-classes and attributes. Currently at version 3.3.0, the package suggests an active development cycle, evidenced by its multiple migration guides for major versions. Key differentiators include its speed, memory efficiency, extensive TypeScript support for a well-documented API, and an interactive playground for real-time testing and visualization of AST outputs.

total hits 22
actors 6 distinct systems
last hit 6d ago MetaBot
ByteDance
11
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany