{"library":"context-parser","type":"library","category":null,"description":"context-parser is a robust and compact HTML5 context parser library designed to analyze web pages and report the execution context of each character, primarily for security purposes like preventing Cross-Site Scripting (XSS). The current stable version is 2.0.1. It differentiates itself by adhering strictly to the HTML5 WHATWG specification for accurate context determination, offering two distinct parser classes: `FastParser` for performance-critical scenarios and `Parser` for feature-rich analysis. The library is event-driven and focuses on the tokenization process to provide precise context reporting without unnecessary overhead, making it suitable for server-side HTML analysis. Its design emphasizes security, simplicity, and straightforward code for easier review and smaller footprint.","language":"javascript","status":"active","version":"2.0.1","tags":["javascript","context","parser","html5"],"last_verified":"Wed May 27","install":[{"cmd":"npm install context-parser","imports":["const { Parser } = require('context-parser');","const { FastParser } = require('context-parser');","parserInstance.contextualize(htmlString);"]},{"cmd":"yarn add context-parser","imports":[]},{"cmd":"pnpm add context-parser","imports":[]}],"homepage":null,"github":"https://github.com/yahoo/context-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/context-parser","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/context-parser/compatibility"}}