# entity-decode

> Environment agnostic entity decoder

Latest version **3.0.0** (published 2025-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install entity-decode
pnpm add entity-decode
yarn add entity-decode
bun add entity-decode
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-02-01 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | shrpne |
| Maintainers | shrpne |
| Keywords | entity, decode |

## Links

- npm: https://www.npmjs.com/package/entity-decode
- Repository: https://github.com/shrpne/entity-decode
- Homepage: https://github.com/shrpne/entity-decode#readme
- Issues: https://github.com/shrpne/entity-decode/issues
- npm.io page: https://npm.io/package/entity-decode

## Dependencies (1)

- [entities](https://npm.io/package/entities.md) ^6.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2025-02-01
- 2.0.2 — 2018-12-13
- 2.0.1 — 2018-09-12
- 2.0.0 — 2018-09-12
- 1.0.1 — 2018-05-30
- 1.0.0 — 2018-05-30

## README

# entity-decode

This purpose of this library is to provide a single interface to browser and node decode implementation.

It is using the following two underlying implementations:
- Browser: micro decode implementation using browser's NodeElement.textContent method
- Node: [he](https://github.com/mathiasbynens/he)

## Example usage

```js
// Load default implementation
var decode = require('entity-decode');

// Load specific version
var decode = require('entity-decode/browser') // browser version
var decode = require('entity-decode/node') // node version

decode('foo &copy; bar &ne; baz &#x1D306; qux') 
// returns 'foo © bar ≠ baz 𝌆 qux'
```

## License

entity-decode is available under the [MIT](https://mths.be/mit) license.

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