Skip to content

inline-json-for-html v0.1.0

Choose a tag to compare

@edilec edilec released this 14 Aug 07:28
e42e7fb

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.