inline-json-for-html v0.1.0
Initial public release.
- Serializes JSON for HTML script-element text.
- Escapes HTML-tokenizing characters while preserving parsed JSON values.
- Includes TypeScript declarations and zero runtime dependencies.
- Tested on Node.js 22, 24, and 26.
Scope: this is not a general-purpose HTML sanitizer and does not protect other output contexts.