Skip to content
jdalton edited this page Sep 8, 2026 · 4 revisions

NWSAPI

Fast CSS selectors API engine with zero dependencies that works in Node.js and browsers.

NWSAPI builds on NWMATCHER with Selectors Level 4 features such as :is(), :where(), and :has(), plus state selectors such as :open and :modal. See the selector support and compatibility notes.

Performance

The current 2.3.0-prerelease records 36 of 36 lower all-results medians, with 32 queries at least 2× faster, against jsdom's default dom-selector engine. First matches are 1.6–8.2× faster across 12 nonempty component queries. These are recorded warm-query fixtures; see the measurements and scope.

These are warm-query results on specific fixtures, using Node.js 26.5.0, jsdom 30.0.1, and dom-selector 8.3.2. NWSAPI is called directly; jsdom's public methods include integration overhead. Some margins are near noise and five all-results cases remain slower. See Performance for the workload, raw results, and limits.

Documentation

These pages describe current master, labeled 2.3.0-prerelease. Features and benchmark results may differ from a published package version.

Clone this wiki locally