AK-21/Graphite-Industrial-Intelligence
0
1# decode-named-character-reference2 3[![Build Status][build-badge]][build]4[![Coverage Status][coverage-badge]][coverage]5[![Downloads][downloads-badge]][downloads]6[![Size][size-badge]][size]7 8Decode named character references.9 10## Contents11 12* [What is this?](#what-is-this)13* [When should I use this?](#when-should-i-use-this)14* [Install](#install)15* [Use](#use)16* [API](#api)17 * [`decodeNamedCharacterReference(value)`](#decodenamedcharacterreferencevalue)18* [Types](#types)19* [Compatibility](#compatibility)20* [Security](#security)21* [Related](#related)22* [Contribute](#contribute)23* [License](#license)24 25## What is this?26 27A workaround for webpack.28 29## When should I use this?30 31Never use this.32Use [`parse-entities`][parse-entities].33It uses this.34 35## Install36 37This package is [ESM only][esm].38In Node.js (version 14.14+, 16.0+), install with [npm][]:39 40```sh41npm install decode-named-character-reference42```43 44In Deno with [`esm.sh`][esmsh]:45 46```js47import {decodeNamedCharacterReference} from 'https://esm.sh/decode-named-character-reference@1'48```49 50In browsers with [`esm.sh`][esmsh]:51 52```html53<script type="module">54 import {decodeNamedCharacterReference} from 'https://esm.sh/decode-named-character-reference@1?bundle'55</script>56```57 58## Use59 60```js61import {decodeNamedCharacterReference} from 'decode-named-character-reference'62 63decodeNamedCharacterReference('amp') //=> '&'64```65 66## API67 68This package exports the identifier `decodeNamedCharacterReference`.69There is no default export.70 71### `decodeNamedCharacterReference(value)`72 73Again, use [`parse-entities`][parse-entities].74 75## Types76 77This package is fully typed with [TypeScript][].78It exports no additional types.79 80## Compatibility81 82This package is at least compatible with all maintained versions of Node.js.83As of now, that is Node.js 14.14+ and 16.0+.84It also works in Deno and modern browsers.85 86## Security87 88This package is safe.89 90## Related91 92* [`parse-entities`][parse-entities]93 — parse (decode) HTML character references94 95## Contribute96 97Yes please!98See [How to Contribute to Open Source][contribute].99 100## License101 102[MIT][license] © [Titus Wormer][author]103 104<!-- Definitions -->105 106[author]: https://wooorm.com107 108[build]: https://github.com/wooorm/decode-named-character-reference/actions109 110[build-badge]: https://github.com/wooorm/decode-named-character-reference/workflows/main/badge.svg111 112[contribute]: https://opensource.guide/how-to-contribute/113 114[coverage]: https://codecov.io/github/wooorm/decode-named-character-reference115 116[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/decode-named-character-reference.svg117 118[downloads]: https://www.npmjs.com/package/decode-named-character-reference119 120[downloads-badge]: https://img.shields.io/npm/dm/decode-named-character-reference.svg121 122[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c123 124[esmsh]: https://esm.sh125 126[license]: license127 128[npm]: https://docs.npmjs.com/cli/install129 130[parse-entities]: https://github.com/wooorm/parse-entities131 132[size]: https://bundlephobia.com/result?p=decode-named-character-reference133 134[size-badge]: https://img.shields.io/bundlephobia/minzip/decode-named-character-reference.svg135 136[typescript]: https://www.typescriptlang.org137 