{"id":15413400,"url":"https://github.com/wooorm/character-reference-invalid","last_synced_at":"2025-04-19T02:52:32.649Z","repository":{"id":57197033,"uuid":"43257096","full_name":"wooorm/character-reference-invalid","owner":"wooorm","description":"Map of invalid numeric character references to their replacements, according to HTML","archived":false,"fork":false,"pushed_at":"2022-11-16T09:21:28.000Z","size":71,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T06:55:26.287Z","etag":null,"topics":["character","entity","html","invalid","reference"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wooorm.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wooorm"}},"created_at":"2015-09-27T17:40:12.000Z","updated_at":"2023-09-08T17:02:05.000Z","dependencies_parsed_at":"2022-08-30T14:51:35.615Z","dependency_job_id":null,"html_url":"https://github.com/wooorm/character-reference-invalid","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Fcharacter-reference-invalid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Fcharacter-reference-invalid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Fcharacter-reference-invalid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Fcharacter-reference-invalid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wooorm","download_url":"https://codeload.github.com/wooorm/character-reference-invalid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249596889,"owners_count":21297458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["character","entity","html","invalid","reference"],"created_at":"2024-10-01T16:56:55.216Z","updated_at":"2025-04-19T02:52:32.623Z","avatar_url":"https://github.com/wooorm.png","language":"JavaScript","funding_links":["https://github.com/sponsors/wooorm"],"categories":[],"sub_categories":[],"readme":"# character-reference-invalid\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nMap of invalid numeric character references to their replacements, according to\nHTML.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`characterReferenceInvalid`](#characterreferenceinvalid)\n*   [Data](#data)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis is a map from the [HTML spec][source] of C1 ASCII/Unicode control\ncharacters (which are disallowed by HTML) to the characters those code points\nwould have in Windows 1252.\nFor example, U+0080 (Padding Character) maps to `€`, because that’s used for\n0x80 in Windows 1252.\n\n## When should I use this?\n\nProbably never, unless you’re dealing with parsing HTML or similar XML-like\nthings, or in a place where Unicode is not the primary encoding (it is in most\nplaces).\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install character-reference-invalid\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {characterReferenceInvalid} from 'https://esm.sh/character-reference-invalid@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {characterReferenceInvalid} from 'https://esm.sh/character-reference-invalid@2?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {characterReferenceInvalid} from 'character-reference-invalid'\n\nconsole.log(characterReferenceInvalid[0x80]) // =\u003e '€'\nconsole.log(characterReferenceInvalid[0x89]) // =\u003e '‰'\nconsole.log(characterReferenceInvalid[0x99]) // =\u003e '™'\n```\n\n## API\n\nThis package exports the identifier `characterReferenceInvalid`.\nThere is no default export.\n\n### `characterReferenceInvalid`\n\nMap of invalid numeric character references to their replacements, according to\nHTML (`Record\u003cnumber, string\u003e`).\n\n## Data\n\nSee [`html.spec.whatwg.org`][source].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`wooorm/character-entities`](https://github.com/wooorm/character-entities)\n    — HTML character entity info\n*   [`wooorm/character-entities-html4`](https://github.com/wooorm/character-entities-html4)\n    — HTML 4 character entity info\n*   [`wooorm/character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)\n    — legacy character entity info\n*   [`wooorm/parse-entities`](https://github.com/wooorm/parse-entities)\n    — parse HTML character references\n*   [`wooorm/stringify-entities`](https://github.com/wooorm/stringify-entities)\n    — serialize HTML character references\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/wooorm/character-reference-invalid/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/character-reference-invalid/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/character-reference-invalid.svg\n\n[coverage]: https://codecov.io/github/wooorm/character-reference-invalid\n\n[downloads-badge]: https://img.shields.io/npm/dm/character-reference-invalid.svg\n\n[downloads]: https://www.npmjs.com/package/character-reference-invalid\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/character-reference-invalid.svg\n\n[size]: https://bundlephobia.com/result?p=character-reference-invalid\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esmsh]: https://esm.sh\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[source]: https://html.spec.whatwg.org/multipage/parsing.html#table-charref-overrides\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooorm%2Fcharacter-reference-invalid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwooorm%2Fcharacter-reference-invalid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooorm%2Fcharacter-reference-invalid/lists"}