# node-html-encoder

> Package for encoding and decoding html string

Latest version **0.0.2** (published 2013-02-08) · 0 weekly downloads

## Install

```sh
npm install node-html-encoder
pnpm add node-html-encoder
yarn add node-html-encoder
bun add node-html-encoder
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2013-02-08 |
| First published | 2011-09-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Pavel Minchenkov |
| Maintainers | minchenkov |
| Keywords | encoder, decoder, html |

## Links

- npm: https://www.npmjs.com/package/node-html-encoder
- Repository: https://github.com/minchenkov/node-html-encoder
- npm.io page: https://npm.io/package/node-html-encoder

## 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

- 0.0.2 (latest) — 2013-02-08
- 0.0.1 — 2011-09-13

## README

# node-html-encoder

NodeJS wrapper for JavaScript HTML Encoder library http://www.strictly-software.com/htmlencode

## Install
    npm install node-html-encoder

## Examples

    var Encoder = require('node-html-encoder').Encoder;

    // entity type encoder
    var encoder = new Encoder('entity');

    console.log(encoder.htmlEncode('<foo /> "bar"'))
    // prints &lt;foo /&gt; &quot;bar&quot;

    console.log(encoder.htmlDecode('&lt;foo /&gt; &quot;bar&quot;'))
    // prints <foo /> "bar"

    // numerical type encoder
    encoder = new Encoder('numerical');

    console.log(encoder.htmlEncode('<foo /> "bar"'))
    // prints &#60;foo /&#62; &#34;bar&#34;

    console.log(encoder.htmlDecode('&#60;foo /&#62; &#34;bar&#34;'))
    // prints <foo /> "bar"

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