{"id":21414878,"url":"https://github.com/magic/entities","last_synced_at":"2025-03-16T18:42:07.028Z","repository":{"id":54291849,"uuid":"244292459","full_name":"magic/entities","owner":"magic","description":"maybe complete list of html entities.","archived":false,"fork":false,"pushed_at":"2023-02-16T07:44:09.000Z","size":625,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T06:48:32.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-02T05:59:46.000Z","updated_at":"2022-11-03T11:15:32.000Z","dependencies_parsed_at":"2024-06-21T15:44:19.637Z","dependency_job_id":"a25a5552-39f7-41c6-b7f0-0432e73b6ef3","html_url":"https://github.com/magic/entities","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fentities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fentities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fentities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fentities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magic","download_url":"https://codeload.github.com/magic/entities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911273,"owners_count":20367651,"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":[],"created_at":"2024-11-22T18:34:23.378Z","updated_at":"2025-03-16T18:42:07.007Z","avatar_url":"https://github.com/magic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @magic/entities\n\nexports most html entities.\n\n[![NPM version][npm-image]][npm-url]\n[![Linux Build Status][travis-image]][travis-url]\n[![Windows Build Status][appveyor-image]][appveyor-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n\n[npm-image]: https://img.shields.io/npm/v/@magic/entities.svg\n[npm-url]: https://www.npmjs.com/package/@magic/entities\n[travis-image]: https://img.shields.io/travis/com/magic/entities/master\n[travis-url]: https://travis-ci.com/magic/entities\n[appveyor-image]: https://img.shields.io/appveyor/ci/magic/entities/master.svg\n[appveyor-url]: https://ci.appveyor.com/project/magic/entities/branch/master\n[coveralls-image]: https://coveralls.io/repos/github/magic/entities/badge.svg\n[coveralls-url]: https://coveralls.io/github/magic/entities\n[greenkeeper-image]: https://badges.greenkeeper.io/magic/entities.svg\n[greenkeeper-url]: https://badges.greenkeeper.io/magic/entities.svg\n[snyk-image]: https://snyk.io/test/github/magic/entities/badge.svg\n[snyk-url]: https://snyk.io/test/github/magic/entities\n\n## installation:\n\n```bash\n  npm install @magic/entities\n```\n\n## usage:\n\n### import entities\n\n@magic/entities export an array of entities.\n\neach entity is an array of the form [numId, symbol, stringId, info]\n\n```javascript\nimport { entities } from '@magic/entities'\n\n// entities is an array filled with arrays:\n\nconst item = entities[4]\nconst [numId, symbol, stringId, info] = item\n\n// not all entities have a stringId or a symbol.\n```\n\n### isEntity\n\nisEntity can test if a string is a valid entity.\n\nisEntity also tests if the string exists in the entities list.\n\n```javascript\nimport { isEntity } from '@magic/entities'\n\nisEntity('\u0026#39;') // true\nisEntity(39) // false\n```\n\n### entityFromId\n\nentityFromId can be passed a string or number.\n\nwraps string in \u0026 and ;\n\nwraps numbers in \u0026# and ;\n\n```javascript\nimport { entityFromId } from '@magic/entities'\n\nentityFromId(39) // '\u0026#39;'\nentityFromId('lt') // '\u0026#lt;'\n```\n\n#### changelog\n\n##### 0.0.1\n\nfirst commit\n\n##### 0.0.2\n\nadd quot for quotation marks. #quot; is a thing...\n\n##### 0.0.3\n\nbump required node version to 14.2.0\n\n##### 0.0.4\n\nupdate @magic/types\n\n##### 0.0.5\n\n- bump required node version to 14.15.4\n- update dependencies\n\n##### 0.0.6\n\nupdate dependencies\nupdate @magic/test devdependency\n\n##### 0.0.7\n\nupdate dependencies\n\n##### 0.0.8\n\nupdate dependencies\n\n##### 0.0.9\n\nupdate dependencies\n\n##### 0.0.10\n\nupdate dependencies\n\n##### 0.0.11\n\nupdate dependencies\n\n##### 0.0.12\n\nupdate dependencies\n\n##### 0.0.13 - unreleased\n\n...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fentities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagic%2Fentities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fentities/lists"}