- Version 1.0.2
- 4.95 kB
- No dependencies
- MIT license
npm i @types/escape-html
yarn add @types/escape-html
pnpm add @types/escape-html
TypeScript definitions for escape-html
escapeHTML: (text?: string | null) => string;
Escape special characters in the given string of text, such that it can be interpolated in HTML content. This function will escape the following characters:
*Note* that the escaped value is only suitable for being interpolated into HTML as the text content of elements in which the tag does not have different escaping mechanisms (it cannot be placed inside
*Note* when using the escaped value within a tag, it is only suitable as the value of an attribute, where the value is quoted with either a double quote character (
") or a single quote character (
Package Files (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to
- HTML<a href="https://www.jsdocs.io/package/@types/escape-html"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3742 ms.
- Missing or incorrect documentation? Open an issue for this package.