# encode-html

> encode html entities

Latest version **1.0.1** (published 2015-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install encode-html
pnpm add encode-html
yarn add encode-html
bun add encode-html
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-10-01 |
| First published | 2015-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andi Neck |
| Maintainers | andineck |
| Keywords | html, encode, entities |

## Links

- npm: https://www.npmjs.com/package/encode-html
- Repository: https://github.com/intesso/encode-html
- Homepage: https://github.com/intesso/encode-html#readme
- Issues: https://github.com/intesso/encode-html/issues
- npm.io page: https://npm.io/package/encode-html

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-10-01
- 1.0.0 — 2015-10-01

## README

# encode-html

- encode html entities
- tiny function that replaces "<", ">", "''", "&" with html entities

# install
```shell
npm install encode-html
```

# use
```javascript
var encode = require('encode-html');

console.log(encode('<div class="hidden">NON&SENSE\'s</div>'));
// -> '&lt;div class="hidden"&gt;NON&amp;SENSE&apos;s&lt;/div&gt;'

```

> (opposite) decode function [decode-html](https://www.npmjs.com/decode-html)

# test
```shell
npm test
```

# license
MIT

# author
Andi Neck | [@andineck](https://twitter.com/andineck) | intesso

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