NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #465 most downloaded on npm
Sniff the encoding of an HTML or XML byte stream
Last release 14 days ago
21 Sep 2026
Ships fairly regularly
a new release about every 1.6 years
Nearly every release is documented
notes for 10 of 10 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
10 releases · first in 2016
Removed support for Node.js v20, and raised the minimum supported Node.js v22 version to v22.13.0.
maxPrescanBytes option to configure the HTML <meta> scan limit, defaulting to 1024 bytes and accepting Infinity to scan the entire input or 0 to skip meta scanning.TypeError when a <meta> element's content="" attribute ends in a truncated charset parameter. (@FedgeNo)<meta> tags whose closing > is missing or falls beyond the prescan limit.Reverted back to the 4.0.0 behavior of returning encoding names instead of labels.
Reverted back to the 4.0.0 behavior of returning encoding names instead of labels.
Added the xml option.
One column per quarter.
Raised the minimum required Node.js version to ^20.19.0 || ^22.12.0 || >=24.0.0.
Raised the minimum required Node.js version to ^20.19.0 || ^22.12.0 || >=24.0.0.
The package now returns encoding labels, not encoding names. (In practice, it returns the lowercase versioned of what it previously returned.)
^20.19.0 || ^22.12.0 || >=24.0.0.Raised the minimum required Node.js version to v18.
Raised the minimum required Node.js version to v18.
<meta charset="x-user-defined"> is now handled correctly.
<meta charset="x-user-defined">.Raised the minimum required Node.js version to v12.
Raised the minimum required Node.js version to v12.
Although it worked before by accident, as of this version any Uint8Array input is officially supported, not just Node.js Buffer objects.
Uint8Array input, not just Node.js Buffer objects. (Although it worked before accidentally.)Fixed cases involving trailing spaces inside attribute values, e.g. content="text/html; charset=iso8859-2 ".
content="text/html; charset=iso8859-2 ".charset, e.g. content="charsetcharset=iso-8859-2".<meta http-equiv="refresh" http-equiv="Content-Type" content="text/html; charset=iso8859-2">.content="text/html; charset=iso8859-2 ".charset, e.g. content="charsetcharset=iso-8859-2".<meta http-equiv="refresh" http-equiv="Content-Type" content="text/html; charset=iso8859-2">.(Breaking) updated minimum required Node.js version to v10.
><meta.<!-->.><meta.<!-->.Relicensed as MIT.
Fixed an off-by-one error in the sniffing code that led to it failing to detect the encoding correctly when attributes were unquoted.
Fixed an off-by-one error in the <meta> sniffing code that led to it failing to detect the encoding correctly when attributes were unquoted.
<meta> sniffing code that led to it failing to detect the encoding correctly when attributes were unquoted.Extracted from jsdom, with some changes to do manual per-spec content-type parsing.
Extracted from jsdom, with some changes to do manual per-spec content-type parsing.
Your coding agent can read these notes before it upgrades. Set up the MCP server →