{"library":"nwsapi","type":"library","category":null,"description":"NWSAPI is a high-performance CSS selector engine, serving as a continuation and significant rework of the earlier `nwmatcher` project, currently at version 2.2.23. Its primary goal is to provide comprehensive and fast support for the latest CSS Level 4 Selectors, while also meticulously emulating native browser APIs such as `querySelector()`, `querySelectorAll()`, `matches()`, and `closest()`. The library is actively maintained, with a focus on continuous bug fixes and feature enhancements, and is intended to replace `nwmatcher` in environments like `jsdom`. NWSAPI differentiates itself through a unique architecture that employs regular expressions to parse CSS selector strings and metaprogramming to transform these into memoized JavaScript function resolvers, a process executed only once per selector for 'unmatched performances'. It ships with no external dependencies and supports both browser environments (via a global `NW.Dom` object) and headless environments like Node.js (as a CommonJS module).","language":"javascript","status":"active","version":"2.2.23","tags":["javascript","css","css3","css4","matcher","selector"],"install":[{"cmd":"npm install nwsapi","imports":["import { select } from 'nwsapi';","import { configure } from 'nwsapi';","<script type=\"text/javascript\" src=\"nwsapi.js\" onload=\"NW.Dom.install()\"></script>"]},{"cmd":"yarn add nwsapi","imports":[]},{"cmd":"pnpm add nwsapi","imports":[]}],"homepage":"https://nwsapi.js.org","github":"https://github.com/dperini/nwsapi","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/nwsapi","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/nwsapi/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Mon Jul 20","install_tag":null}}