escape-html
npmv1.0.3Escape string for use in HTML
Not recommended for new projects
No — escape-html should not be adopted for new projects. Last published 4027 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 4027 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies.
- ASupply chain: grade A, Excellent.
No install scripts, 2 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 escape-html 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.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the escape-html README.
var escape = require('escape-html');
var html = escape('foo & bar');
// -> foo & barescape-html 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 |
|---|---|---|---|---|
| escape-htmlthis page | 0 | 7 | MIT | 11 years ago |
| html-escaper | 79.8M | 1 | MIT | 1 day ago |
| type-fest | 337.8M | 6 | (MIT OR CC0-1.0) | 1 day ago |
| escape-string-regexp | 316.5M | 8 | MIT | 1 day ago |
| dom-serializer | 94.3M | 2 | MIT | 1 day ago |
| follow-redirects | 91.6M | 2 | MIT | 1 day ago |
Dependencies
Declared by escape-html v1.0.3. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on escape-html.
Native-ESM powered web dev build tool
Node.js final http responder
Better streaming static file server with Range and conditional-GET support
Fast, unopinionated, minimalist web framework
Koa web app framework
Serve static files
Development-only error handler middleware
Relationship graph
Dependencies (left) and dependents (right) of escape-html.
Frequently installed together
An extremely fast JavaScript and CSS bundler and minifier.
Vite DevTools
Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol
A pure JavaScript implementation of Sass.
Create simple HTTP ETags
An AST-based pattern checker for JavaScript.
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Tool for transforming styles with JS plugins
JavaScript parser and stringifier for YAML
Open stuff like URLs, files, executables. Cross-platform.
Execute a callback when a request closes, finishes, or errors
Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.
Release history
No releases in the last two years, typically about 283 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.0.3latest | 11 years ago | — | MIT |
| 1.0.2 | 11 years ago | — | MIT |
| 1.0.1 | 12 years ago | — | MIT |
| 1.0.0 | 13 years ago | — | MIT |
| 0.0.1 | 14 years ago | — | MIT |
Overview
escape-html is an npm package that escape string for use in HTML. It has 7 known dependents in the graph. The latest version is 1.0.3, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need escape string for use in HTML 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).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use escape-html?
No — escape-html should not be adopted for new projects. Last published 4027 days ago.
How do I install escape-html?
Run `npm install escape-html` to add escape-html to your npm project.
What license is escape-html released under?
escape-html is distributed under the MIT license.
How popular is escape-html?
npm does not publish download counts. Within PackageGraph's crawl, 7 known packages depend on escape-html.
Is escape-html still maintained?
The most recent release of escape-html (v1.0.3) was published 11 years ago.
Does escape-html run install scripts?
No. escape-html does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.