
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
bo-selector
Advanced tools
A CSS selector parser based on jison
var parser = require('./bo-selector').parser;
var ast = parser.parse(".a[b = c], c[d]:e:f(g *:h:i[j]:k), :l > m[n ~= 'o']");
console.log(require('util').inspect(ast, false, null));
...generates:
{ type: 'selector_list',
selectors:
[ { type: 'constraint_list',
constraints:
[ { type: 'class', name: 'a' },
{ type: 'attribute_equals', name: 'b', value: 'c' } ] },
{ type: 'element',
name: 'c',
constraints:
[ { type: 'has_attribute', name: 'd' },
{ type: 'pseudo_class', name: 'e' },
{ type: 'pseudo_func',
func:
{ type: 'function',
name: 'f',
args:
{ type: 'selector_list',
selectors:
[ { type: 'combinator_selector',
left: { type: 'element', name: 'g', constraints: [] },
right:
{ type: 'element',
name: '*',
constraints:
[ { type: 'pseudo_class', name: 'h' },
{ type: 'pseudo_class', name: 'i' },
{ type: 'has_attribute', name: 'j' },
{ type: 'pseudo_class', name: 'k' } ] },
combinator: 'descendant' } ] } } } ] },
{ type: 'combinator_selector',
left:
{ type: 'constraint_list',
constraints: [ { type: 'pseudo_class', name: 'l' } ] },
right:
{ type: 'element',
name: 'm',
constraints: [ { type: 'attribute_contains_word', name: 'n', value: 'o' } ] },
combinator: 'child' } ] }
Craig David - Bo' Selecta Ruined My Life
BSD
FAQs
CSS selector parser based on jison
The npm package bo-selector receives a total of 155,610 weekly downloads. As such, bo-selector popularity was classified as popular.
We found that bo-selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.