Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

character-entities

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Issues
File Explorer

Advanced tools

character-entities

Map of named character references

    2.0.2latest

Version published
Maintainers
1
Weekly downloads
7,537,035
decreased by-12%

Weekly downloads

Changelog

Source

2.0.2

  • 1e865fe Fix a couple broken named character references

Full Changelog: https://github.com/wooorm/character-entities/compare/2.0.1...2.0.2

Readme

Source

character-entities

Build Coverage Downloads Size

Map of named character references.

Contents

What is this?

This is a map of named character references in HTML (latest) to the characters they represent.

When should I use this?

Maybe when you’re writing an HTML parser or minifier, but otherwise probably never! Even then, it might be better to use parse-entities or stringify-entities.

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with npm:

npm install character-entities

In Deno with esm.sh:

import {characterEntities} from 'https://esm.sh/character-entities@2'

In browsers with esm.sh:

<script type="module"> import {characterEntities} from 'https://esm.sh/[email protected]?bundle' </script>

Use

import {characterEntities} from 'character-entities' console.log(characterEntities.AElig) // => ' console.log(characterEntities.aelig) // => ' console.log(characterEntities.amp) // => '&'

API

This package exports the identifier characterEntities. There is no default export.

characterEntities

Mapping between (case-sensitive) character entity names to replacements. See html.spec.whatwg.org for more info.

Types

This package is fully typed with TypeScript.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+. It also works in Deno and modern browsers.

Security

This package is safe.

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

Keywords

FAQs

What is character-entities?

Map of named character references

Is character-entities popular?

The npm package character-entities receives a total of 7,206,411 weekly downloads. As such, character-entities popularity was classified as popular.

Is character-entities well maintained?

We found that character-entities demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 22 Jun 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc