[d24f17c] | 1 | # character-entities
|
---|
| 2 |
|
---|
| 3 | [![Build][build-badge]][build]
|
---|
| 4 | [![Downloads][downloads-badge]][downloads]
|
---|
| 5 | [![Size][size-badge]][size]
|
---|
| 6 |
|
---|
| 7 | HTML character entity information.
|
---|
| 8 |
|
---|
| 9 | ## Install
|
---|
| 10 |
|
---|
| 11 | [npm][]:
|
---|
| 12 |
|
---|
| 13 | ```sh
|
---|
| 14 | npm install character-entities
|
---|
| 15 | ```
|
---|
| 16 |
|
---|
| 17 | ## Use
|
---|
| 18 |
|
---|
| 19 | ```js
|
---|
| 20 | var characterEntities = require('character-entities')
|
---|
| 21 |
|
---|
| 22 | console.log(characterEntities.AElig) // => 'Æ'
|
---|
| 23 | console.log(characterEntities.aelig) // => 'æ'
|
---|
| 24 | console.log(characterEntities.amp) // => '&'
|
---|
| 25 | ```
|
---|
| 26 |
|
---|
| 27 | ## API
|
---|
| 28 |
|
---|
| 29 | ### characterEntities
|
---|
| 30 |
|
---|
| 31 | Mapping between (case-sensitive) character entity names to replacements.
|
---|
| 32 |
|
---|
| 33 | ## Support
|
---|
| 34 |
|
---|
| 35 | See [`html.spec.whatwg.org`][html].
|
---|
| 36 |
|
---|
| 37 | ## Related
|
---|
| 38 |
|
---|
| 39 | * [`character-entities-html4`](https://github.com/wooorm/character-entities-html4)
|
---|
| 40 | — HTML 4 character entity info
|
---|
| 41 | * [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)
|
---|
| 42 | — Legacy character entity info
|
---|
| 43 | * [`parse-entities`](https://github.com/wooorm/parse-entities)
|
---|
| 44 | — Parse HTML character references
|
---|
| 45 | * [`stringify-entities`](https://github.com/wooorm/stringify-entities)
|
---|
| 46 | — Stringify HTML character references
|
---|
| 47 |
|
---|
| 48 | ## License
|
---|
| 49 |
|
---|
| 50 | [MIT][license] © [Titus Wormer][author]
|
---|
| 51 |
|
---|
| 52 | <!-- Definitions -->
|
---|
| 53 |
|
---|
| 54 | [build-badge]: https://img.shields.io/travis/wooorm/character-entities.svg
|
---|
| 55 |
|
---|
| 56 | [build]: https://travis-ci.org/wooorm/character-entities
|
---|
| 57 |
|
---|
| 58 | [downloads-badge]: https://img.shields.io/npm/dm/character-entities.svg
|
---|
| 59 |
|
---|
| 60 | [downloads]: https://www.npmjs.com/package/character-entities
|
---|
| 61 |
|
---|
| 62 | [size-badge]: https://img.shields.io/bundlephobia/minzip/character-entities.svg
|
---|
| 63 |
|
---|
| 64 | [size]: https://bundlephobia.com/result?p=character-entities
|
---|
| 65 |
|
---|
| 66 | [npm]: https://docs.npmjs.com/cli/install
|
---|
| 67 |
|
---|
| 68 | [license]: license
|
---|
| 69 |
|
---|
| 70 | [author]: https://wooorm.com
|
---|
| 71 |
|
---|
| 72 | [html]: https://html.spec.whatwg.org/multipage/syntax.html#named-character-references
|
---|