# @types/escape-html

> TypeScript definitions for escape-html

Latest version **1.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/escape-html
pnpm add @types/escape-html
yarn add @types/escape-html
bun add @types/escape-html
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/escape-html
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/escape-html
- npm.io page: https://npm.io/package/@types/escape-html

## Recent versions

- 1.0.4 (latest) — 2023-11-07
- 1.0.2 (ts3.9) — 2022-04-14
- 1.0.1 (ts3.5) — 2021-04-20
- 1.0.0 (ts2.9) — 2020-05-13
- 0.0.20 (ts2.0) — 2017-08-21
- 1.0.3 — 2023-10-18
- 0.0.19 — 2016-09-19
- 0.0.18 — 2016-07-14
- 0.0.17-alpha — 2016-07-08
- 0.0.16-alpha — 2016-07-04
- 0.0.15-alpha — 2016-07-02
- 0.0.14-alpha — 2016-07-01
- 0.0.13-alpha — 2016-07-01
- 0.0.12-alpha — 2016-05-25
- 0.0.11-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/escape-html/versions

## README

# Installation
> `npm install --save @types/escape-html`

# Summary
This package contains type definitions for escape-html (https://github.com/component/escape-html).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/escape-html.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/escape-html/index.d.ts)
````ts
/**
 * Escape string for use in HTML
 */

/**
 * 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: `"`, `'`, `&`, `<`, and `>`.
 *
 * *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
 * `<style>` or `<script>`, for example, as those content bodies are not HTML, but CSS and JavaScript,
 * respectively; these are known as "raw text elements" in the HTML standard).
 *
 * *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 (`'`).
 */
declare function escapeHTML(text?: string | null): string;

export = escapeHTML;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: none

# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

---
_Source: https://npm.io/package/@types/escape-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
