{"id":13483959,"url":"https://github.com/retextjs/retext-emoji","last_synced_at":"2025-12-12T03:15:54.669Z","repository":{"id":17657382,"uuid":"20461967","full_name":"retextjs/retext-emoji","owner":"retextjs","description":"plugin to support emoji, gemoji, and emoticons","archived":false,"fork":false,"pushed_at":"2024-10-23T15:48:06.000Z","size":379,"stargazers_count":34,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T07:40:30.138Z","etag":null,"topics":["emoji","emoticon","gemoji","natural-language","retext","retext-plugin"],"latest_commit_sha":null,"homepage":"https://retextjs.github.io/retext-emoji","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/retextjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"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":"2014-06-03T22:25:12.000Z","updated_at":"2024-05-03T01:52:52.000Z","dependencies_parsed_at":"2024-01-13T18:24:27.549Z","dependency_job_id":"1a96c275-2217-4da1-bd7e-ec0ffa95a57f","html_url":"https://github.com/retextjs/retext-emoji","commit_stats":{"total_commits":229,"total_committers":2,"mean_commits":114.5,"dds":0.008733624454148492,"last_synced_commit":"4237580ef98e864d9c288b8c1571ef39be3458aa"},"previous_names":["wooorm/retext-emoji"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retextjs","download_url":"https://codeload.github.com/retextjs/retext-emoji/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445669,"owners_count":20939958,"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":["emoji","emoticon","gemoji","natural-language","retext","retext-plugin"],"created_at":"2024-07-31T17:01:17.296Z","updated_at":"2025-12-12T03:15:49.625Z","avatar_url":"https://github.com/retextjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["JavaScript"],"sub_categories":[],"readme":"# retext-emoji\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to support emoji (`❤️`), gemoji (`:heart:`), and\nemoticons (`\u003c3`).\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    *   [`unified().use(retextEmoji[, options])`](#unifieduseretextemoji-options)\n    *   [`Options`](#options)\n*   [Data](#data)\n*   [Syntax tree](#syntax-tree)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to classify emoji (`❤️`),\ngemoji (`:heart:`), and emoticons (`\u003c3`) as a specific node, and to optionally\ntransform them from one type to another.\n\n## When should I use this?\n\nYou can either use this plugin any time there are emoji, gemoji, or emoticons\nin prose that are (incorrectly) warned about by linting plugins, or you can\nuse it to transform them.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install retext-emoji\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextEmoji from 'https://esm.sh/retext-emoji@9'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import retextEmoji from 'https://esm.sh/retext-emoji@9?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport retext from 'retext'\nimport emoji from 'retext-emoji'\n\nconst file = await retext()\n  .use(emoji, {convert: 'encode'})\n  .process('I’m going to bed. :zzz:')\n\nconsole.log(String(file))\n```\n\nYields:\n\n```txt\nI’m going to bed. 💤\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`retextEmoji`][api-retext-emoji].\n\n### `unified().use(retextEmoji[, options])`\n\nPlugin to support emoji (`❤️`), gemoji (`:heart:`), and emoticons (`\u003c3`).\n\n###### Parameters\n\n*   `options` ([`Options`][api-options], optional)\n    — configuration\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `convert` (`'encode'` or `'decode'`, optional)\n    — whether to decode (`❤️` and `\u003c3` to `:heart:`), encode (`:heart:` and\n    `\u003c3` to `❤️`), or do nothing\n\n## Data\n\n`retext-emoji` supports every [`emoticon`][emoticon] and [`gemoji`][gemoji].\n\n## Syntax tree\n\nThis plugin applies several nlcst utilities to build the AST.\nSee their readmes for the node types supported in the tree:\n\n*   [`nlcst-emoticon-modifier`][nlcst-emoticon-modifier]\n    — emoticons\n*   [`nlcst-emoji-modifier`][nlcst-emoji-modifier]\n    — emoji and gemoji\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\nThe `Emoticon` node is exposed from\n[`nlcst-emoticon-modifier`][nlcst-emoticon-modifier].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `retext-emoji@^9`,\ncompatible with Node.js 16.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organisation, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/retextjs/retext-emoji/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-emoji/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-emoji.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-emoji\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-emoji.svg\n\n[downloads]: https://www.npmjs.com/package/retext-emoji\n\n[size-badge]: https://img.shields.io/bundlejs/size/retext-emoji\n\n[size]: https://bundlejs.com/?q=retext-emoji\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[emoticon]: https://github.com/wooorm/emoticon/blob/main/support.md\n\n[gemoji]: https://github.com/wooorm/gemoji/blob/main/support.md\n\n[nlcst-emoticon-modifier]: https://github.com/syntax-tree/nlcst-emoticon-modifier\n\n[nlcst-emoji-modifier]: https://github.com/syntax-tree/nlcst-emoji-modifier\n\n[retext]: https://github.com/retextjs/retext\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[api-retext-emoji]: #unifieduseretextemoji-options\n\n[api-options]: #options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretextjs%2Fretext-emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-emoji/lists"}