html-encoding-sniffer
npmv6.0.0Sniff the encoding from a HTML byte stream
Safe to adopt
Yes — html-encoding-sniffer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 258 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 258 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 432 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 6 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding html-encoding-sniffer to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing html-encoding-sniffer, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node ^20.19.0 || ^22.12.0 || >=24.0.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the html-encoding-sniffer README.
const htmlEncodingSniffer = require("html-encoding-sniffer");
const fs = require("fs");
const htmlBytes = fs.readFileSync("./html-page.html");
const sniffedEncoding = htmlEncodingSniffer(htmlBytes);html-encoding-sniffer vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| html-encoding-snifferthis page | 0 | 1 | MIT | 8 months ago |
| dom-serializer | 94.3M | 2 | MIT | 1 day ago |
| html-escaper | 79.8M | 1 | MIT | 1 day ago |
| is-potential-custom-element-name | 41.4M | 2 | MIT | 1 day ago |
| cheerio | 24.1M | 5 | MIT | 1 day ago |
| anser | 10.4M | 3 | MIT | 1 day ago |
Dependencies
Declared by html-encoding-sniffer v6.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (3)
Used by
Popular packages that depend on html-encoding-sniffer.
Relationship graph
Dependencies (left) and dependents (right) of html-encoding-sniffer.
Frequently installed together
An implementation of the WHATWG URL Standard's URL API and parsing machinery
An HTTP/1.1 client, written from scratch for Node.js
An AST-based pattern checker for JavaScript.
Check whether a given string matches the `PotentialCustomElementName` production as defined in the HTML Standard.
An arbitrary-precision Decimal type for JavaScript.
Implements the WebIDL algorithms for converting to and from JavaScript values
Parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard
CSS color - Resolve and convert CSS colors.
A per-spec XML serializer implementation
Validates whether a string matches the production for an XML name or qualified name
CSS syntax patches for CSS tree
A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations
Release history
2 releases in the last two years, typically about 573 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.0.0latest | 8 months ago | 12 KB | MIT |
| 5.0.0 | 8 months ago | 12 KB | MIT |
| 4.0.0 | 2 years ago | 11 KB | MIT |
| 3.0.0 | 5 years ago | 11 KB | MIT |
| 2.0.1 | 6 years ago | 11 KB | MIT |
| 2.0.0 | 6 years ago | 11 KB | MIT |
| 1.0.2 | 9 years ago | — | MIT |
| 1.0.1 | 10 years ago | — | WTFPL |
| 1.0.0 | 10 years ago | — | WTFPL |
Overview
html-encoding-sniffer is an npm package that sniff the encoding from a HTML byte stream. It has 1 known dependents in the graph. The latest version is 6.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need sniff the encoding from a HTML byte stream and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use html-encoding-sniffer?
Yes — html-encoding-sniffer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 258 days ago. 2 releases in the last 2 years.
How do I install html-encoding-sniffer?
Run `npm install html-encoding-sniffer` to add html-encoding-sniffer to your npm project.
How many dependencies does html-encoding-sniffer have?
html-encoding-sniffer declares 4 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 432 KB on disk.
What license is html-encoding-sniffer released under?
html-encoding-sniffer is distributed under the MIT license.
How popular is html-encoding-sniffer?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on html-encoding-sniffer.
Is html-encoding-sniffer still maintained?
The most recent release of html-encoding-sniffer (v6.0.0) was published 8 months ago.
Does html-encoding-sniffer run install scripts?
No. html-encoding-sniffer does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.