{"id":28376194,"url":"https://github.com/wadehrarshpreet/emoji-node","last_synced_at":"2026-05-01T03:38:54.091Z","repository":{"id":57224771,"uuid":"104794638","full_name":"wadehrarshpreet/emoji-node","owner":"wadehrarshpreet","description":"Emoji Support for NodeJS Project","archived":false,"fork":false,"pushed_at":"2020-01-02T17:05:47.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-01T03:38:39.459Z","etag":null,"topics":["emoji","emoticon","nodejs","smiley"],"latest_commit_sha":null,"homepage":"","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/wadehrarshpreet.png","metadata":{"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}},"created_at":"2017-09-25T19:44:41.000Z","updated_at":"2017-09-25T21:48:56.000Z","dependencies_parsed_at":"2022-09-06T13:22:29.178Z","dependency_job_id":null,"html_url":"https://github.com/wadehrarshpreet/emoji-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wadehrarshpreet/emoji-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadehrarshpreet%2Femoji-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadehrarshpreet%2Femoji-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadehrarshpreet%2Femoji-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadehrarshpreet%2Femoji-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wadehrarshpreet","download_url":"https://codeload.github.com/wadehrarshpreet/emoji-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wadehrarshpreet%2Femoji-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32484352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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","emoticon","nodejs","smiley"],"created_at":"2025-05-30T00:05:46.413Z","updated_at":"2026-05-01T03:38:54.059Z","avatar_url":"https://github.com/wadehrarshpreet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emoji-node\n\n_simple emoji support for node.js projects_\n\n\n## Installation\nTo install `emoji-node`, you need [node.js](http://nodejs.org/) and [npm](https://github.com/npm/npm#super-easy-install). :rocket:\n\nOnce you have that set-up, just run `npm install --save emoji-node` or `yarn add emoji-node` in your project directory. :ship:\n\nYou're now ready to use emoji in your node projects! Awesome! :metal:\n\n## Usage\n```javascript\nvar emoji = require('emoji-node')\nemoji.get('coffee') // returns the emoji code for coffee (displays emoji on terminals that support it)\nemoji.which(emoji.get('coffee')) // returns the string \"coffee\"\nemoji.get(':fast_forward:') // `.get` also supports github flavored markdown emoji (http://www.emoji-cheat-sheet.com/)\nemoji.get('heart') //❤️\nemoji.get(':)') //😄\nemoji.emojify('I :heart: :coffee:!') // replaces all :emoji: with the actual emoji, in this case: returns \"I ❤️ ☕️!\"\nemoji.emojify(\":-) :* \u003c3 ^_^ \u003e:o (y) -_- :smile: ;) :P O:) :/ :'( 3:)\") // replace almost all shorthand emoji support 😄 😘 ❤️ 😙 😆 👍 😑 😄 😉 😛 👼 😕 😢 😈\nemoji.random() // returns a random emoji + key, e.g. `{ emoji: '❤️', key: 'heart' }`\nemoji.search('cof') // returns an array of objects with matching emoji's. `[{ emoji: '☕️', key: 'coffee' }, { emoji: ⚰', key: 'coffin'}]`\nemoji.unemojify('I ❤️ 🍕') // replaces the actual emoji with :emoji:, in this case: returns \"I :heart: :pizza:\"\nemoji.find('🍕') // Find the `pizza` emoji, and returns `({ emoji: '🍕', key: 'pizza' })`;\nemoji.find('pizza') // Find the `pizza` emoji, and returns `({ emoji: '🍕', key: 'pizza' })`;\nemoji.hasEmoji('🍕') // Validate if this library knows an emoji like `🍕`\nemoji.hasEmoji('pizza') // Validate if this library knowns a emoji with the name `pizza`\nemoji.strip('⚠️ 〰️ 〰️ low disk space') // Strips the string from emoji's, in this case returns: \"low disk space\".\nemoji.replace('⚠️ 〰️ 〰️ low disk space', (emoji) =\u003e `${emoji.key}:`) // Replace emoji's by callback method: \"warning: low disk space\"\n```\n\n## Options\n\n### onMissing\n`emoji.emojify(str, onMissing)`\n\nAs second argument, `emojify` takes an handler to parse unknown emojis. Provide a function to add your own handler:\n\n```js\nvar onMissing = function (name) {\n  return name;\n});\n\nvar emojified = emoji.emojify('I :unknown_emoji: :star: :another_one:', onMissing);\n// emojified: I unknown_emoji ⭐️ another_one\n```\n\n### format\n`emoji.emojify(str, onMissing, format)`\n\nAs third argument, `emojify` takes an handler to wrap parsed emojis. Provide a function to place emojis in custom elements, and to apply your custom styling:\n\n```js\nvar format = function (code, name) {\n  return '\u003cimg alt=\"' + code + '\" src=\"' + name + '.png\" /\u003e';\n});\n\nvar emojified = emoji.emojify('I :unknown_emoji: :star: :another_one:', null, format);\n// emojified: I \u003cimg alt=\"❤️\" src=\"heart.png\" /\u003e \u003cimg alt=\"☕️\" src=\"coffee.png\" /\u003e\n```\n\n## Adding new emoji\nEmoji come from js-emoji (Thanks a lot :thumbsup:). You can get a JSON file with all emoji here: https://raw.githubusercontent.com/wadehrarshpreet/emoji-node/master/lib/emoji.json\n\nTo update the list or add custom emoji, clone this repository and put them into `lib/emojifile.js`.\nThen run `npm run-script emojiparse` in the project directory or `node emojiparse` in the lib directory.\nThis should generate the new emoji.json file and output `Done.`.\n\nThat's all, you now have more emoji you can use! :clap:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadehrarshpreet%2Femoji-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwadehrarshpreet%2Femoji-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwadehrarshpreet%2Femoji-node/lists"}