mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
1 line
8.7 KiB
JSON
1 line
8.7 KiB
JSON
{"name":"emoji-regex","description":"A regular expression to match all Emoji-only symbols as per the Unicode Standard.","dist-tags":{"latest":"9.2.2"},"versions":{"8.0.0":{"name":"emoji-regex","version":"8.0.0","description":"A regular expression to match all Emoji-only symbols as per the Unicode Standard.","main":"index.js","types":"index.d.ts","license":"MIT","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"repository":{"type":"git","url":"git+https://github.com/mathiasbynens/emoji-regex.git"},"bugs":{"url":"https://github.com/mathiasbynens/emoji-regex/issues"},"scripts":{"build":"rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js","test":"mocha","test:watch":"npm run test -- --watch"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/plugin-proposal-unicode-property-regex":"^7.2.0","@babel/preset-env":"^7.3.4","mocha":"^6.0.2","regexgen":"^1.3.0","unicode-12.0.0":"^0.7.9"},"gitHead":"a9f2e514523d4c0931974aff5059052da10c52c5","_id":"emoji-regex@8.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","dist":{"integrity":"sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==","shasum":"e818fd69ce5ccfcb404594f842963bf53164cc37","tarball":"http://localhost:4260/emoji-regex/emoji-regex-8.0.0.tgz","fileCount":8,"unpackedSize":48255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfsbPCRA9TVsSAnZWagAAr8oP/1XbIqEdVhX0sTGbaxsq\n2McAMLM6oAIrjkBXrNdMgP9fX5kEUfAE45JTbpZU6RprIM8GnhPAyJKauwmj\nIUFKvwSMdwxUPOsYljPiWYRrjsqn1rDENI/q9vwISwOJuqTg/h+Y6V5PQj8b\nQbSnzFDkuDlAgmp4BPPtNFZdpSQNtaylpC08GkKZneQXfCuV2uOB3PTTelIV\nYnANLh09gEmrKeCEKp2WYhc1wANK1Bae04GEr+8tsoKoDDhiMktEzhuhCs/8\nvl9pQPa2xuNa3SbZF3bZtyiuF8CJUJin9R5sooqjBOHKw58taxfu5A5GwGNx\n9Uss9ysWTfuKKRJTmSG5OaRF49/bmIXPSpt4uwIywFtaWCdPgfeOorBUHeun\n1v4EhksSXggKIW1i1KbNQT6b0OIqEV7GQI5XWWlxhZ5vSFXSjTtasLyf/NtY\nJVOBlb8+fGFygQvzb1QjVDuKtEnnILTGbCVDIYx8yDiTW7z2Qt7Id3Sp+Whr\naRHjVE1mSB3tQrAyBvIw3650stwxMnS++c+qJbCaR/90JKahD3vM40Zt6aAO\nn31zq6N00oUefhd+2YwpUbmDqWQiROZCBKbRcYB1gDiIcu9PaenCeJkvgNId\nVoB6Mb3DYZggjjQcOGtdcS2ZcYaY2UexGuItbYqoMTvdmIcWqjEMq+oOaAjw\n/TqM\r\n=NmDr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+waQdufSheUTEjvna3EaQZWs+5GUI/0/r9f5VSiZIAAiEA9mR+WzssFvsrqZPJ7zzRTzWZRyOxn1ZaJlSRNglwMlk="}]},"directories":{},"_hasShrinkwrap":false},"9.2.2":{"name":"emoji-regex","version":"9.2.2","description":"A regular expression to match all Emoji-only symbols as per the Unicode Standard.","main":"index.js","types":"index.d.ts","license":"MIT","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"repository":{"type":"git","url":"git+https://github.com/mathiasbynens/emoji-regex.git"},"bugs":{"url":"https://github.com/mathiasbynens/emoji-regex/issues"},"scripts":{"build":"rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src es2015_types -D -d ./es2015; node script/inject-sequences.js","test":"mocha","test:watch":"npm run test -- --watch"},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.4","@babel/plugin-proposal-unicode-property-regex":"^7.4.4","@babel/preset-env":"^7.4.4","@unicode/unicode-13.0.0":"^1.0.3","mocha":"^6.1.4","regexgen":"^1.3.0"},"gitHead":"0ffa466d7ab65af304d03dddd3a92a2d8268e7ce","_id":"emoji-regex@9.2.2","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==","shasum":"840c8803b0d8047f4ff0cf963176b32d4ef3ed72","tarball":"http://localhost:4260/emoji-regex/emoji-regex-9.2.2.tgz","fileCount":15,"unpackedSize":97916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPhpBCRA9TVsSAnZWagAA1/YQAJ00Flm0hn1THHoKTG0t\nylutoznvVmXBkTi8RRd7sUoXWfWYTTYYd0kZy1sFqlBdqYSvafkt5gMvednF\nnbhYuFyYM+xhVaLJNiWspc2uMuUHwlivQYrCqH4Sak3YPzhk0hBuj5sgAk4U\nYcGYf4gKOVp/jwcmXVZWWFrn+Rm07/OHZzhIsBnWzBh99UWzFwFom/nGaoCe\nVZxx2OOrWmWFNVDKtubMnJADaHug7oo0o0S4YyMHQU6Rn69flvafdA5f076m\nnn9NVUO/h8He4xrLXoAnUybphaSNJPnFENqK1gN26e5nOzzsAxwRY5DKG9zA\n7czAXBGNAGYkjV8wOC+suYGgwvmfnKqf8h5Teerdo9Gcycn7sHIdsU+qAV2D\n+KqNJ8ql6nI0xrIf8lYtmxZjYjOPhUaKEer/sfxZUUqNzO0LdAkBOpK7Rga3\nFQyB0Pvg3VEFjmL78eDj3/D5GY1VYXogFXJY2lWrd02kPM6IlMjBQH9X9jx6\nwq84cFdGvDmW37dAtJdfuplkPNDd4I3Ivv8ASBphxqPjbSPCgn2vMueKIwHv\nEf8h8QUy9y/qo1QrVjo7kHrdFcjx73zgLZMElrlN9ax1KsgPxXTUmTZoN0K6\ntkC5T6h2LAnyxyi+x2/8XMnFTuzG20ExspSMVWBI4kHQtDWjua9YlCbIccgi\n81rc\r\n=B/lZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcrGCbwiwzFWONg4AI9JKPLHIGCCljRRyA4x8QCMhWDAiEA22sFAR+MgR75takXx5jHHB1cLnhXUYIoWF5xMrMD5ds="}]},"directories":{},"_hasShrinkwrap":false}},"readme":"# emoji-regex [![Build status](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml/badge.svg)](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml) [![emoji-regex on npm](https://img.shields.io/npm/v/emoji-regex)](https://www.npmjs.com/package/emoji-regex)\n\n_emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on [_emoji-test-regex-pattern_](https://github.com/mathiasbynens/emoji-test-regex-pattern), which generates (at build time) the regular expression pattern based on the Unicode Standard. As a result, _emoji-regex_ can easily be updated whenever new emoji are added to Unicode.\n\n## Installation\n\nVia [npm](https://www.npmjs.com/):\n\n```bash\nnpm install emoji-regex\n```\n\nIn [Node.js](https://nodejs.org/):\n\n```js\nconst emojiRegex = require('emoji-regex');\n// Note: because the regular expression has the global flag set, this module\n// exports a function that returns the regex rather than exporting the regular\n// expression itself, to make it impossible to (accidentally) mutate the\n// original regular expression.\n\nconst text = `\n\\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation)\n\\u{2194}\\u{FE0F}: ↔️ default text presentation character rendered as emoji\n\\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base)\n\\u{1F469}\\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier\n`;\n\nconst regex = emojiRegex();\nfor (const match of text.matchAll(regex)) {\n const emoji = match[0];\n console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);\n}\n```\n\nConsole output:\n\n```\nMatched sequence ⌚ — code points: 1\nMatched sequence ⌚ — code points: 1\nMatched sequence ↔️ — code points: 2\nMatched sequence ↔️ — code points: 2\nMatched sequence 👩 — code points: 1\nMatched sequence 👩 — code points: 1\nMatched sequence 👩🏿 — code points: 2\nMatched sequence 👩🏿 — code points: 2\n```\n\n## For maintainers\n\n### How to update emoji-regex after new Unicode Standard releases\n\n1. [Update _emoji-test-regex-pattern_ as described in its repository](https://github.com/mathiasbynens/emoji-test-regex-pattern#how-to-update-emoji-test-regex-pattern-after-new-uts51-releases).\n\n1. Bump the _emoji-test-regex-pattern_ dependency to the latest version.\n\n1. Update the Unicode data dependency in `package.json` by running the following commands:\n\n ```sh\n # Example: updating from Unicode v13 to Unicode v14.\n npm uninstall @unicode/unicode-13.0.0\n npm install @unicode/unicode-14.0.0 --save-dev\n ````\n\n 1. Generate the new output:\n\n ```sh\n npm run build\n ```\n\n 1. Verify that tests still pass:\n\n ```sh\n npm test\n ```\n\n### How to publish a new release\n\n1. On the `main` branch, bump the emoji-regex version number in `package.json`:\n\n ```sh\n npm version patch -m 'Release v%s'\n ```\n\n Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).\n\n Note that this produces a Git commit + tag.\n\n1. Push the release commit and tag:\n\n ```sh\n git push && git push --tags\n ```\n\n Our CI then automatically publishes the new release to npm.\n\n## Author\n\n| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](https://mathiasbynens.be/) |\n\n## License\n\n_emoji-regex_ is available under the [MIT](https://mths.be/mit) license.\n","homepage":"https://mths.be/emoji-regex","repository":{"type":"git","url":"git+https://github.com/mathiasbynens/emoji-regex.git"},"author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"bugs":{"url":"https://github.com/mathiasbynens/emoji-regex/issues"},"license":"MIT","readmeFilename":"README.md"}
|