{"_id":"@adraffy/emoji","_rev":"5-58d31b461379062ec3e5b5c1e5cbf2a4","name":"@adraffy/emoji","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@adraffy/emoji","version":"0.0.1","keywords":["UTS-51","Unicode","Emoji","RGI"],"author":{"url":"http://raffy.antistupid.com","name":"raffy.eth","email":"raffy@me.com"},"license":"MIT","_id":"@adraffy/emoji@0.0.1","maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"homepage":"https://github.com/adraffy/emoji.js#readme","bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"dist":{"shasum":"1296e62e05791afceea426901c182db8e77efc56","tarball":"https://registry.npmjs.org/@adraffy/emoji/-/emoji-0.0.1.tgz","fileCount":7,"integrity":"sha512-dcGPoq8B9i9OrAqLQK1TiVm4zzAgg862y1PpdtuMTzRFemKzAH9W3JgXpEqBV0PC6TYfy+iDY9E8h6yO+UE4Jg==","signatures":[{"sig":"MEUCIQCmOQtz00CGBuhedeNGBdHtRdCNb42GMyv+HtkVwZ20DQIgZgHSfQdWC518bjO6a50CCwVfGFbBMBJ6s79qDPE/5tM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35673},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"5c1c8b5c75e18dad9d6b5bcaf65b314a6929f0d2","scripts":{"make":"node src/make.js","test":"node test/coder.js && node test/regex.js && node test/qualified.js","build":"rollup -c"},"_npmUser":{"name":"adraffy","email":"raffy@me.com"},"repository":{"url":"git+https://github.com/adraffy/emoji.js.git","type":"git"},"_npmVersion":"9.6.4","description":"0-dependency UTS-51 Emoji parser","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^3.21.7","@rollup/plugin-terser":"^0.4.1","@rollup/plugin-node-resolve":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/emoji_0.0.1_1684130731741_0.8592783300249234","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@adraffy/emoji","version":"0.0.2","keywords":["UTS-51","Unicode","Emoji","RGI"],"author":{"url":"http://raffy.antistupid.com","name":"raffy.eth","email":"raffy@me.com"},"license":"MIT","_id":"@adraffy/emoji@0.0.2","maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"homepage":"https://github.com/adraffy/emoji.js#readme","bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"dist":{"shasum":"1462f7012d7c8edfb391f62cd3c892adb1a17e14","tarball":"https://registry.npmjs.org/@adraffy/emoji/-/emoji-0.0.2.tgz","fileCount":7,"integrity":"sha512-zCPN5ZVMdvz6WKbCiYEwkXYAFZQ1Xo7LlNedlIvACYA8i+MRf9KMz7gtUErCFPjZezgPr530sBY32DSS1vooyQ==","signatures":[{"sig":"MEUCIQD+AHcMy220V+Ff89677ELjhYltOSojXxHonJgi96UN3QIgAiU10nFciXi/tiaVlR4tLuw3lcxQZNvBCKv4tgdPFQ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35787},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"af54ad8afa4d87adc820ddf728dd5cb7e70458dc","scripts":{"make":"node src/make.js","test":"node test/coder.js && node test/regex.js && node test/qualified.js","build":"rollup -c"},"_npmUser":{"name":"adraffy","email":"raffy@me.com"},"repository":{"url":"git+https://github.com/adraffy/emoji.js.git","type":"git"},"_npmVersion":"9.6.4","description":"0-dependency UTS-51 Emoji parser","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^3.21.7","@rollup/plugin-terser":"^0.4.1","@rollup/plugin-node-resolve":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/emoji_0.0.2_1684131978279_0.5895916819171809","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@adraffy/emoji","version":"0.0.4","keywords":["Emoji","UTS-51","Unicode","RGI"],"author":{"url":"http://raffy.antistupid.com","name":"raffy.eth","email":"raffy@me.com"},"license":"MIT","_id":"@adraffy/emoji@0.0.4","maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"homepage":"https://github.com/adraffy/emoji.js#readme","bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"dist":{"shasum":"2c7e7e2816dde9006db63f88bd02ceaa1cbda61c","tarball":"https://registry.npmjs.org/@adraffy/emoji/-/emoji-0.0.4.tgz","fileCount":8,"integrity":"sha512-J8sb400qLcnfq3n9msUa9Pw26XYKHy6G/q+MKL5MI9ZigjI7oE10NJXaoBB6M4CxH24Eda8hNfy9SAUDJqIiDA==","signatures":[{"sig":"MEUCIQDQgbizzrm6F3YlYfhJkAGK/KCJwgUAapJNxOYqsLA7mgIgVsH/UB8p3JNBcCEVwN2DHD/qJ5itOevfOIvOxV/YSb8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":671191},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"cbabb21309ebc105e9254c177598e2d934a8173c","scripts":{"make":"node src/make.js","test":"node test/coder.js && node test/regex.js && node test/qualified.js","build":"rollup -c"},"_npmUser":{"name":"adraffy","email":"raffy@me.com"},"repository":{"url":"git+https://github.com/adraffy/emoji.js.git","type":"git"},"_npmVersion":"9.6.4","description":"UTS-51 Emoji Parser","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^3.21.7","@rollup/plugin-terser":"^0.4.1","@rollup/plugin-node-resolve":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/emoji_0.0.4_1693718530780_0.34569750689126977","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@adraffy/emoji","version":"0.0.5","keywords":["Emoji","UTS-51","Unicode","RGI"],"author":{"url":"http://raffy.antistupid.com","name":"raffy.eth"},"license":"MIT","_id":"@adraffy/emoji@0.0.5","maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"homepage":"https://github.com/adraffy/emoji.js#readme","bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"dist":{"shasum":"155d14404df68c8a343ed88ab89e671f93788439","tarball":"https://registry.npmjs.org/@adraffy/emoji/-/emoji-0.0.5.tgz","fileCount":8,"integrity":"sha512-a2FAEvAYk5PGi7NBGYpSV98sNES/REi2jv+UwJGqCoo4FZUnjwcuV7EyywGLEiPUztF3JkuaOIFlHd4DkmJxfQ==","signatures":[{"sig":"MEQCIGLIPG+A5jw1rQlLfk5exQAI7dr2fEGd2ADKhxeGFiCJAiBQOkLEbKPwub6rSFJ1C8oBwbXag5fJs7BWdSVRporiKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24706},"type":"module","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"gitHead":"4a1448ced164ca88c4d0ad86f3eb2a057e46567d","scripts":{"make":"node src/make.js","test":"node test/coder.js && node test/regex.js && node test/qualified.js","build":"cp dist/index.d.mts dist/index.d.cts && rollup -c"},"_npmUser":{"name":"adraffy","email":"raffy@me.com"},"repository":{"url":"git+https://github.com/adraffy/emoji.js.git","type":"git"},"_npmVersion":"10.8.3","description":"UTS-51 Emoji Parser","directories":{},"_nodeVersion":"22.1.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.21.3","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/emoji_0.0.5_1726287320893_0.12154466503768302","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@adraffy/emoji","version":"0.0.6","description":"UTS-51 Emoji Parser","keywords":["Emoji","UTS-51","Unicode","RGI"],"type":"module","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"repository":{"type":"git","url":"git+https://github.com/adraffy/emoji.js.git"},"license":"MIT","bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"homepage":"https://github.com/adraffy/emoji.js#readme","author":{"name":"raffy.eth","url":"http://raffy.antistupid.com"},"scripts":{"make":"node src/make.js","test":"node test/coder.js && node test/regex.js && node test/qualified.js","build":"cp dist/index.d.mts dist/index.d.cts && rollup -c","download":"node src/download.js"},"devDependencies":{"@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","rollup":"^4.21.3"},"gitHead":"94963a283d3a1ed92befcd45f9f5c0d4de6a2587","_id":"@adraffy/emoji@0.0.6","_nodeVersion":"24.5.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-9hi1eBbdStacJMkGZyDB0LNtGbhANDTzA05kh5TA0xz6HAlGD6p/DeIv2u9EqzbrQRFHAuv9ecT5ay7GIfttwg==","shasum":"218080a0eb137dbd2f2f9ff6d6472c5105775003","tarball":"https://registry.npmjs.org/@adraffy/emoji/-/emoji-0.0.6.tgz","fileCount":8,"unpackedSize":24747,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAQRlapVtlMfEmka+HNWuMV5W/YYEyI+RJyMVO0VWpsBAiEAioKhg1tgH4bTP1kGnHlfM4csbbhQfnzN4/bIXqYD+II="}]},"_npmUser":{"name":"adraffy","email":"raffy@me.com"},"directories":{},"maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emoji_0.0.6_1764579192599_0.692116363187415"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-15T06:05:31.666Z","modified":"2025-12-01T08:53:12.963Z","0.0.1":"2023-05-15T06:05:31.897Z","0.0.2":"2023-05-15T06:26:18.470Z","0.0.4":"2023-09-03T05:22:11.116Z","0.0.5":"2024-09-14T04:15:21.054Z","0.0.6":"2025-12-01T08:53:12.788Z"},"bugs":{"url":"https://github.com/adraffy/emoji.js/issues"},"author":{"name":"raffy.eth","url":"http://raffy.antistupid.com"},"license":"MIT","homepage":"https://github.com/adraffy/emoji.js#readme","keywords":["Emoji","UTS-51","Unicode","RGI"],"repository":{"type":"git","url":"git+https://github.com/adraffy/emoji.js.git"},"description":"UTS-51 Emoji Parser","maintainers":[{"name":"adraffy","email":"raffy@me.com"}],"readme":"# emoji.js\n\n0-dependency [UTS-51](https://www.unicode.org/reports/tr51/) Emoji Parser.\n\n`npm i @adraffy/emoji` [&check;](https://www.npmjs.com/package/@adraffy/emoji)\n\n* Unicode `17.0.0`\n* Minified File Size: [`5KB`](./dist/index.min.js)\n* ✅️ Passes **100%** [Unicode Emoji Tests](https://www.unicode.org/Public/emoji/16.0/emoji-test.txt)\n\n[**Demo**](https://adraffy.github.io/emoji.js/test/demo.html) ⭐\n\n```js\nimport {POSSIBLE_REGEX, RGI_REGEX, RGI_EMOJI} from '@adraffy/emoji';\n// browser: https://cdn.jsdelivr.net/npm/@adraffy/emoji@latest/dist/index.min.js\n\n// RegExp that matches UTS-51 \"Possible\" Emoji\n// see: https://www.unicode.org/reports/tr51/#EBNF_and_Regex\n// with some modifications:\n// * matches 1-2 regional indicator instead of exactly 2\n// * matches repeated inner/trailing FE0F\n// * matches trailing FE0E\n// * does NOT match isolated [#*0-9] w/o FE0F\nlet match = 'abc💩\\u200D💩xyz'.match(POSSIBLE_REGEX);\n// [\n//   '💩‍💩',\n//   '💩',\n//   '💩',\n//   index: 4,\n//   input: 'abc 💩‍💩 xyz',\n// ]\n\n// RegExp that only matches RGI Emoji\n// * FE0F are optional during matching\nlet match = 'abc👁️‍🗨️xyz'.match(RGI_REGEX);\n// [\n//   '👁️', \n//   index: 4, \n//   input: 'abc 👁️‍🗨️ 123'\n// ]\n\n// string[] of all **fully-qualified** RGI Emoji\n// see: https://unicode.org/emoji/charts/full-emoji-list.html\nconsole.log(RGI_EMOJI); \n// [ '⌚', '⌛', '⏩', ... ]\n```\n\nSplit a string into tokens:\n```js\n// string -> Token[]\nlet tokens = tokenize('abc💩\\uFE0Eabc💩\\u200D💩abc');\n// [\n//   { index: 0, text: 'abc' },\n//   { index: 3, emoji: '💩︎', RGI: '💩' },\n//   { index: 6, text: 'abc' },\n//   { index: 9, emoji: '💩‍💩' },\n//   { index: 14, text: 'abc' }\n// ]\n\n// Usage examples:\n//  Purge ALL Emoji: tokens.map(x => x.text || '').join('');\n//  Keep Text & RGI: tokens.map(x => x.text || x.RGI || '').join('');\n//   Upgrade to RGI: tokens.map(x => x.text || x.RGI || x.emoji).join('');\n```\n\nConvert an Emoji to fully-qualified RGI, if possible:\n```Javascript\n// string -> string?\nqualifize('\\u2639\\uFE0F');       // \"☹️\" <2639 FE0F>\nqualifize('\\u2639\\uFE0F\\uFE0F'); // \"☹️\" <2639 FE0F>\nqualifize('\\u2639\\uFE0E');       // \"☹️\" <2639 FE0F>\nqualifize('\\u2639');             // \"☹️\" <2639 FE0F>\nqualifize('x');                  // undefined\n\n// Note: qualifize(x) is truthy if x is RGI-able\n// x === qualifize(x) iff x is fully-qualified RGI\n```\n\n## Build\n\n* `git clone` this repo, then `npm install` \n* `npm run download <version>` — download [Unicode files](./src/15.0.0/)\n\t* Edit version in [`spec.js`](./src/spec.js)\n* `npm run make`\n\t* Creates [`include.js`](./src/include.js) and [`data.json`](./dist/data.json)\n* `npm run test`\n* `npm run build` — create `/dist/`\n","readmeFilename":"README.md"}