escape-html
npmv1.0.3Escape string for use in HTML
Overview
escape-html is an npm package that escape string for use in HTML. It is extremely widely used, with about 93.4M downloads per week and 3 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 battle-tested, widely-adopted 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
- Large, well-established user base (93.4M weekly downloads).
- 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.
Relationship graph
Dependencies (left) and dependents (right) of escape-html.
Dependencies
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
Serve static files
Fast, unopinionated, minimalist web framework
Koa web app framework
Alternatives to escape-html
🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).
A small utility for creating warnings and emitting them.
A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.
HTTP and HTTPS modules that follow redirects.
Minimizer plugin for webpack
Escape RegExp special characters
A JavaScript implementation of many web standards
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
UI for Vitest
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
Check whether a given string matches the `PotentialCustomElementName` production as defined in the HTML Standard.
Utility to parse a string bytes to bytes and vice-versa
Frequently installed together
Encode a URL to a percent-encoded form, excluding already-encoded sequences
HTTP status utility
An AST-based pattern checker for JavaScript.
Execute a callback when a request closes, finishes, or errors
parse a url with memoization
Lightweight debugging utility for Node.js and the browser
The ultimate javascript content-type utility.
Create HTTP error objects
HTTP response freshness testing
Create simple HTTP ETags
An extremely fast JavaScript and CSS bundler and minifier.
Create and parse HTTP Content-Type header
Version history
| Version | Published | 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 |
Maintainers
Frequently asked questions
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?
escape-html has approximately 93,381,741 downloads per week and 3 known dependent packages.