The `bo-selector` package provides a CSS selector parser capable of generating an Abstract Syntax Tree (AST) from a CSS selector string. It is built using `jison`, a parser generator, which is a development dependency, meaning the runtime package has no external dependencies. The package is currently at version 0.0.10 and has not seen updates since its last publish in October 2013, indicating it is an abandoned project. Its primary utility is to parse CSS selectors like `'p:has(.foo), b'` into a structured JavaScript object that represents the selector's components and relationships. It exclusively uses the CommonJS module system. Given its age and lack of maintenance, it is highly unlikely to support modern CSS selector features introduced after 2013, nor does it provide an ECMAScript Module (ESM) entry point, making integration into contemporary JavaScript projects challenging.
npm install bo-selectorVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing a CSS selector string into an Abstract Syntax Tree (AST) and inspecting its structure.
Consider using modern, actively maintained CSS selector parsers or libraries (e.g., PostCSS, css-tree) for new projects. If you must use this package, be aware of its limitations and security implications.
Ensure your project is configured for CommonJS (`require()`) when using this package. If your project is ESM-first, you may need to use a bundler or dynamic import (`await import()`) if compatibility layers exist, or prefer an alternative ESM-compatible parser.
Test your specific selector syntax extensively. For selectors not supported, you will need to manually parse or pre-process them, or switch to a more modern parser.
Use the CommonJS `require()` syntax: `const parser = require('bo-selector').parser;`Ensure you are accessing the `parser` property from the required module: `const { parser } = require('bo-selector');` or `const boselector = require('bo-selector'); const parser = boselector.parser;`No dependency data recorded yet.