{"_id":"@astronautlabs/emoji","_rev":"3-4d85271650d2b54f367bb57865bd9dfe","name":"@astronautlabs/emoji","dist-tags":{"latest":"17.1.0"},"versions":{"1.0.0":{"name":"@astronautlabs/emoji","version":"1.0.0","keywords":["emoji","DOM","parser","images","unicode"],"author":{"url":"https://astronautlabs.com/","name":"Astronaut Labs LLC"},"license":"MIT","_id":"@astronautlabs/emoji@1.0.0","maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"homepage":"https://github.com/astronautlabs/emoji","bugs":{"url":"https://github.com/astronautlabs/emoji/issues"},"dist":{"shasum":"4b36a7e97c2a86c02d788db4ae49917703996968","tarball":"https://registry.npmjs.org/@astronautlabs/emoji/-/emoji-1.0.0.tgz","fileCount":7433,"integrity":"sha512-5H8lRiVIz/MwfxQ7Sv2wi0fTeN2ZqMrkvfi4nDN7qrnrm+BTBiB8UYoGnutwh2SETESGyEkku2dQOlJEh3W59g==","signatures":[{"sig":"MEUCIAQ1y4c0OH2d8d1WnOy8jz6bufcwxT85rzubD6lo1tPqAiEAnzuqxuplPeYWzz5YLe6Rgi5IVSxdyMGNDwrLAVd05Fg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14371769},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist.esm/index.js","gitHead":"955fb5e437f51e149a15257221ff6aa7c1e64f77","scripts":{"build":"npm run build:cjs && npm run build:esm","generate":"ts-node ./src/scripts/generate.ts","build:cjs":"tsc -b","build:esm":"tsc -b tsconfig.esm.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"rezonant","email":"wilahti@gmail.com"},"repository":{"url":"git://github.com/astronautlabs/emoji.git","type":"git"},"_npmVersion":"9.9.2","description":"A Unicode standard based way to implement emoji across all platforms.","directories":{},"_nodeVersion":"20.19.4","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.8.2","ts-node":"^10.9.2","mustache":"^4.2.0","typescript":"^5.9.3","@types/yaml":"^1.9.7","@types/mustache":"^4.2.6"},"_npmOperationalInternal":{"tmp":"tmp/emoji_1.0.0_1767755001840_0.06649065757111328","host":"s3://npm-registry-packages-npm-production"}},"17.0.0":{"name":"@astronautlabs/emoji","version":"17.0.0","keywords":["emoji","DOM","parser","images","unicode"],"author":{"url":"https://astronautlabs.com/","name":"Astronaut Labs LLC"},"license":"MIT","_id":"@astronautlabs/emoji@17.0.0","maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"homepage":"https://github.com/astronautlabs/emoji","bugs":{"url":"https://github.com/astronautlabs/emoji/issues"},"dist":{"shasum":"dbbe148c7355e595d7d093bccaf45073338fad2b","tarball":"https://registry.npmjs.org/@astronautlabs/emoji/-/emoji-17.0.0.tgz","fileCount":8069,"integrity":"sha512-pifretXMiSTEhRsAG6BsjlaLU/0PWCymWu63kEb7eJKQ6FL1omUYTnJv7yp15CZY1DGEvqciTHZoI3VKso0VmA==","signatures":[{"sig":"MEYCIQD9QJ/CiHdixFiSkkH1KejY0PU62/7dBms4dFevvvU62wIhAMl5j3gc8Td/VVPRkE9VIuXBMOFcunA1ZvmzYiXD4Z6i","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17471042},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist.esm/index.js","gitHead":"3662cbe1764dc505c151b3303d3ce467d400e524","scripts":{"build":"npm run build:cjs && npm run build:esm","clean":"rimraf dist dist.esm","generate":"ts-node ./src/scripts/generate.ts","build:cjs":"tsc -b","build:esm":"tsc -b tsconfig.esm.json","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"rezonant","email":"wilahti@gmail.com"},"repository":{"url":"git://github.com/astronautlabs/emoji.git","type":"git"},"_npmVersion":"9.9.2","description":"A Unicode standard based way to implement emoji across all platforms.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"emoji-regex":"^10.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.2","ts-node":"^10.9.2","typescript":"^5.9.3","@types/yaml":"^1.9.7","@types/mustache":"^4.2.6"},"_npmOperationalInternal":{"tmp":"tmp/emoji_17.0.0_1767819626372_0.22830023213403394","host":"s3://npm-registry-packages-npm-production"}},"17.1.0":{"version":"17.1.0","name":"@astronautlabs/emoji","license":"MIT","description":"A Unicode standard based way to implement emoji across all platforms.","homepage":"https://github.com/astronautlabs/emoji","keywords":["emoji","DOM","parser","images","unicode"],"devDependencies":{"@types/mustache":"^4.2.6","@types/yaml":"^1.9.7","rimraf":"^6.1.2","ts-node":"^10.9.2","typescript":"^5.9.3"},"publishConfig":{"access":"public"},"author":{"name":"Astronaut Labs LLC","url":"https://astronautlabs.com/"},"repository":{"type":"git","url":"git://github.com/astronautlabs/emoji.git"},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist.esm/index.js","scripts":{"build":"npm run build:cjs && npm run build:esm","build:cjs":"tsc -b","build:esm":"tsc -b tsconfig.esm.json","clean":"rimraf dist dist.esm","generate":"ts-node ./src/scripts/generate.ts","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"emoji-regex":"^10.6.0"},"_id":"@astronautlabs/emoji@17.1.0","gitHead":"b171ead10e72345519d00f4a22134db33629259e","bugs":{"url":"https://github.com/astronautlabs/emoji/issues"},"_nodeVersion":"20.19.4","_npmVersion":"9.9.2","dist":{"integrity":"sha512-CjlzmRgzYNZ+7oIFapyiAqIu9TpJp8PbKE5qM8Vm4e6y67nCsh0OaBq+yLYDYylgJOm5nv+Ki9V7Q8+QMdpAyg==","shasum":"aaf6ecd4dfd8101a16dfe73c6b7b24e2075b32da","tarball":"https://registry.npmjs.org/@astronautlabs/emoji/-/emoji-17.1.0.tgz","fileCount":8093,"unpackedSize":17876398,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCr673/kdtuFXAbZYLqpiGrKHjFHuRyAvWTLIeNYs2ZuQIhAI86srHqKR9e38Yp6XyF+cNgODjwN1J3d+LLMfV+o6cC"}]},"_npmUser":{"name":"rezonant","email":"wilahti@gmail.com"},"directories":{},"maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emoji_17.1.0_1767823387013_0.4016724423256026"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T03:03:21.742Z","modified":"2026-01-07T22:03:07.609Z","1.0.0":"2026-01-07T03:03:22.219Z","17.0.0":"2026-01-07T21:00:26.729Z","17.1.0":"2026-01-07T22:03:07.398Z"},"bugs":{"url":"https://github.com/astronautlabs/emoji/issues"},"author":{"name":"Astronaut Labs LLC","url":"https://astronautlabs.com/"},"license":"MIT","homepage":"https://github.com/astronautlabs/emoji","keywords":["emoji","DOM","parser","images","unicode"],"repository":{"type":"git","url":"git://github.com/astronautlabs/emoji.git"},"description":"A Unicode standard based way to implement emoji across all platforms.","maintainers":[{"name":"rezonant","email":"wilahti@gmail.com"}],"readme":"# @/emoji\r\n\r\nA simple library that provides standard Unicode [emoji](http://en.wikipedia.org/wiki/Emoji) support across all platforms.\r\nForked from [twemoji](https://github.com/twitter/twemoji).\r\n\r\nAdheres to the [Unicode 17.0 spec](https://unicode.org/versions/Unicode17.0.0/) and supports the \r\n[Emoji 17.0 spec](https://www.unicode.org/reports/tr51/tr51-29.html).\r\n\r\nOffers support for all Unicode-defined emoji which are recommended for general interchange (RGI).\r\n\r\n## License\r\n\r\nCode\r\n> Copyright 2025 Astronaut Labs, LLC.  \r\n> Copyright 2019 Twitter, Inc and other contributors.  \r\n> Licensed under the MIT License: <http://opensource.org/licenses/MIT>\r\n\r\nGraphics\r\n> Copyright 2019 Twitter, Inc and other contributors.  \r\n> Licensed under CC-BY 4.0: <https://creativecommons.org/licenses/by/4.0/>\r\n\r\n### Attribution Requirements\r\n\r\nThe graphics are provided under the Creative Commons Attribution 4.0 license as stated above.\r\n\r\nTwitter, Inc. provided the following guidance on how to adhere to the license's attribution requirements when publishing the original `twemoji` library:\r\n\r\n> As an open source project, attribution is critical from a legal, practical and motivational perspective in our \r\n> opinion. The graphics are licensed under the CC-BY 4.0 which has a pretty good guide on \r\n> [best practices for attribution](https://wiki.creativecommons.org/Best_practices_for_attribution).\r\n>\r\n> However, we consider the guide a bit onerous and as a project, will accept a mention in a project README or an \r\n> 'About' section or footer on a website. In mobile applications, a common place would be in the Settings/About \r\n> section (for example, see the mobile Twitter application Settings->About->Legal section). We would consider a \r\n> mention in the HTML/JS source sufficient also.\r\n\r\n## Usage\r\n\r\n```\r\nnpm install @astronautlabs/emoji\r\n```\r\n\r\n### How to use the Graphics\r\n\r\nThe graphics are bundled in the NPM package in the `assets` directory. So within your project, you should be able to \r\naccess them from:\r\n\r\n> `./node_modules/@astronautlabs/emoji/assets`\r\n\r\nThis folder corresponds to the `baseUrl` option used within the library, so if `/emoji` was mapped to this folder, you would set `baseUrl` to `/emoji`.\r\n\r\nYou are free to copy them to where you need them or configure your web server to serve them within your product. Just \r\nmake sure to adhere to the **Attribution requirements** mentioned above.\r\n\r\n### Replace all emojis in an HTMLElement\r\n\r\n```ts\r\nimport { EmojiParser } from '@astronautlabs/emoji';\r\n\r\nlet div = document.createElement('div');\r\ndiv.textContent = 'I \\u2764\\uFE0F emoji!';\r\ndocument.body.appendChild(div);\r\n\r\nEmojiParser.parse(document.body, { baseUrl: '/path/to/images' });\r\n\r\n// Result:\r\n// I <img src=\"/path/to/images/72x72/2764.png\" alt=\"\\u2764\\uFE0F\" className=\"emoji\" draggable=\"false\" /> emoji!\r\n```\r\n\r\n### Accessing Emoji Data\r\n\r\nThis library bundles information about what emojis are available. This can be used to build your own emoji picker,\r\nfor example.\r\n\r\n```ts\r\nimport { EMOJI } from '@astronautlabs/emoji';\r\n\r\nfor (const category of EMOJI.categories) {\r\n    console.log(`Category: ${category.title}`);\r\n    for (const emoji of category.items) {\r\n        console.log(`- ${emoji.string}: ${emoji.description}, ${emoji.keywords.join(',')}`);\r\n    }\r\n});\r\n```\r\n\r\n### Using the Raw Data\r\n\r\nThe raw emoji data used by this library is also bundled in the NPM package in JSON format, should you wish to use it outside of the library. You can find it at:\r\n\r\n> `./node_modules/@astronautlabs/emoji/emoji.json`\r\n\r\nNote that you do not need this for normal usage of the library (the data is generated into the Typescript source files).\r\n\r\n## Thank you to the Twemoji contributors\r\n\r\nThe following contributors worked hard to build Twemoji:\r\n\r\n* Justine De Caires (ex-Twitter)\r\n* Jason Sofonia (ex-Twitter)\r\n* Bryan Haggerty (ex-Twitter)\r\n* Nathan Downs (ex-Twitter)\r\n* Tom Wuttke (ex-Twitter)\r\n* Andrea Giammarchi (ex-Twitter)\r\n* Joen Asmussen (WordPress)\r\n* Marcus Kazmierczak (WordPress)\r\n* Kevin VQ Dam (ex-Discord)\r\n* Gica Tam (Discord)\r\n* Ben Olson (Discord)\r\n\r\n> _The goal of [the Twemoji project] is to simply provide emoji for everyone. We definitely welcome improvements and fixes, but we may not merge every pull request suggested by the community due to the simple nature of the project._\r\n> \r\n> _Thank you to all of our [contributors](https://github.com/jdecked/twemoji/graphs/contributors)._\r\n\r\n# References\r\n\r\n- [UNICODE CLDR JSON Character Annotations](https://github.com/unicode-org/cldr-json/tree/main/cldr-json/cldr-annotations-full)\r\n","readmeFilename":"README.md"}