{"id":23665902,"url":"https://github.com/xingxing-collective/node-emoji-nuxt","last_synced_at":"2026-02-07T02:02:30.098Z","repository":{"id":269791237,"uuid":"908160688","full_name":"xingxing-collective/node-emoji-nuxt","owner":"xingxing-collective","description":"Friendly emoji lookups and parsing utilities for nuxt module. 💖","archived":false,"fork":false,"pushed_at":"2024-12-26T09:20:12.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T20:55:14.798Z","etag":null,"topics":["emoji","emojis","emoticons","node-emoji","nuxt-module","smiley","smileys","smilies"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xingxing-collective.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-25T09:57:35.000Z","updated_at":"2024-12-26T09:20:16.000Z","dependencies_parsed_at":"2024-12-26T08:24:25.539Z","dependency_job_id":"36485a6d-7d1f-42ac-a1d7-5680eab23e2d","html_url":"https://github.com/xingxing-collective/node-emoji-nuxt","commit_stats":null,"previous_names":["xingxing-collective/nuxt-emoji","xingxing-collective/node-emoji-nuxt"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xingxing-collective/node-emoji-nuxt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxing-collective%2Fnode-emoji-nuxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxing-collective%2Fnode-emoji-nuxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxing-collective%2Fnode-emoji-nuxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxing-collective%2Fnode-emoji-nuxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xingxing-collective","download_url":"https://codeload.github.com/xingxing-collective/node-emoji-nuxt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxing-collective%2Fnode-emoji-nuxt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29184977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","emojis","emoticons","node-emoji","nuxt-module","smiley","smileys","smilies"],"created_at":"2024-12-29T06:19:33.282Z","updated_at":"2026-02-07T02:02:30.068Z","avatar_url":"https://github.com/xingxing-collective.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emoji Nuxt Module\n\n\u003e Friendly emoji lookups and parsing utilities for Node.js. 💖\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n[![Nuxt][nuxt-src]][nuxt-href]\n\n[Node Emoji](https://github.com/omnidan/node-emoji) Nuxt Module supporting v3\n\n- [✨ \u0026nbsp;Release Notes](/CHANGELOG.md)\n- [🏀 \u0026nbsp;Online playground](https://stackblitz.com/github/xingxing-collective/node-emoji-nuxt?file=playground%2Fapp.vue)\n\u003c!-- - [📖 \u0026nbsp;Documentation](https://example.com) --\u003e\n\n## Quick Setup\n\n1. Add `node-emoji-nuxt` dependency to your project\n\n```bash\nnpx nuxi@latest module add node-emoji-nuxt\n```\n\n2. Add `node-emoji-nuxt` to the `modules` section of `nuxt.config.ts`\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n    'node-emoji-nuxt'\n  ]\n})\n```\n\n## Basic Usage\n\nYou can use the provided `$emoji` to access node-emoji-nuxt in template.\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    {{ $emoji.emojify(\"I :heart: :coffee:!\") }}\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## Composables\n\nYou can use the useEmoji,useEmojify and useUnemojify composable to access node-emoji-nuxt anywhere.\n\n```ts\nconst emoji = useEmoji()\nemoji.emojify(\"I :heart: :coffee:!\") // 'I ❤️ ☕️!'\n// or use the useEmojify composable\n\nemoji.unemojify('The 🦄 is a fictitious animal.') // 'The :unicorn: is a fictitious animal.'\n// or use the useUnemojify composable\n```\n## API\n\n### emoji.emojify(input, options?)\n\nParse all markdown-encoded emojis in a string.\n\nParameters:\n\n1. **`input`** (`string`): The input string containing the markdown-encoding emojis.\n1. **`options`** _(optional)_:\n   - **`fallback`** (`string`; default: `\"\"`): The string to fallback to if an emoji was not found.\n   - **`format`** (`() =\u003e (emoji: string, part: string, string: string) =\u003e string`; default: `value =\u003e value`): Add a middleware layer to modify each matched emoji after parsing.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.emojify('The :unicorn: is a fictitious animal.'))\n// 'The 🦄 is a fictitious animal.'\n```\n\n### emoji.find(emoji)\n\nGet the name and character of an emoji.\n\nParameters:\n\n1. **`emoji`** (`string`): The emoji to get the data of.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.find('🦄'))\n// { name: 'unicorn', emoji: '🦄' }\n```\n\n### emoji.get(name)\n\nGet an emoji from an emoji name.\n\nParameters:\n\n1. **`name`** (`string`): The name of the emoji to get.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.get('unicorn'))\n// '🦄'\n```\n\n### emoji.has(emoji)\n\nCheck if this library supports a specific emoji.\n\nParameters:\n\n1. **`emoji`** (`string`): The emoji to check.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.has('🦄'))\n// true\n```\n\n### emoji.random()\n\nGet a random emoji.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.random())\n// { name: 'unicorn', emoji: '🦄' }\n```\n\n### emoji.replace(input, replacement)\n\nReplace the emojis in a string.\n\nParameters:\n\n- **`input`** (`string`): The input string.\n- **`replacement`** (`string | (emoji: string, index: number, string: string) =\u003e string`): The character to replace the emoji with.\n  Can be either a string or a callback that returns a string.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.replace('The 🦄 is a fictitious animal.', 'unicorn'))\n// 'The unicorn is a fictitious animal.'\n```\n\n### emoji.search(keyword)\n\nSearch for emojis containing the provided name in their name.\n\nParameters:\n\n1. **`keyword`** (`string`): The keyword to search for.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.search('honey'))\n// [ { name: 'honeybee', emoji: '🐝' }, { name: 'honey_pot', emoji: '🍯' } ]\n```\n\n### emoji.strip(input, options?)\n\nRemove all of the emojis from a string.\n\nParameters:\n\n1. **`input`** (`string`): The input string to strip the emojis from.\n1. **`options`** _(optional)_:\n\n   - **`preserveSpaces`** (`boolean`): Whether to keep the extra space after a stripped emoji.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.strip('🦄 The unicorn is a fictitious animal.'))\n// 'The unicorn is a fictitious animal.'\n\nconsole.log(\n  emoji.strip('🦄 The unicorn is a fictitious animal.', {\n    preserveSpaces: true,\n  }),\n)\n// ' The unicorn is a fictitious animal.'\n```\n\n### emoji.unemojify(input)\n\nConvert all emojis in a string to their markdown-encoded counterparts.\n\nParameters:\n\n1. **`input`** (`string`): The input string containing the emojis.\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.unemojify('The 🦄 is a fictitious animal.'))\n// 'The :unicorn: is a fictitious animal.'\n```\n\n### emoji.which(emoji, options?)\n\nGet an emoji name from an emoji.\n\nParameters:\n\n1. **`emoji`** (`string`): The emoji to get the name of.\n1. **`options`** _(optional)_:\n   - **`markdown`** (`boolean`; default: `false`): Whether to return a `\":emoji:\"` string instead of `\"emoji\"`\n\n```ts\nconst emoji = useEmoji()\n\nconsole.log(emoji.which('🦄'))\n// 'unicorn'\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate type stubs\nnpm run dev:prepare\n\n# Develop with the playground\nnpm run dev\n\n# Build the playground\nnpm run dev:build\n\n# Run ESLint\nnpm run lint\n\n# Run Vitest\nnpm run test\nnpm run test:watch\n\n# Release new version\nnpm run release\n```\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/node-emoji-nuxt/latest.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-version-href]: https://npmjs.com/package/node-emoji-nuxt\n[npm-downloads-src]: https://img.shields.io/npm/dm/node-emoji-nuxt.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-downloads-href]: https://npmjs.com/package/node-emoji-nuxt\n[license-src]: https://img.shields.io/npm/l/node-emoji-nuxt.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[license-href]: https://npmjs.com/package/node-emoji-nuxt\n[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js\n[nuxt-href]: https://nuxt.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingxing-collective%2Fnode-emoji-nuxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxingxing-collective%2Fnode-emoji-nuxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingxing-collective%2Fnode-emoji-nuxt/lists"}