{"id":24011928,"url":"https://github.com/emish89/smile2emoji","last_synced_at":"2025-04-06T13:11:58.394Z","repository":{"id":34931907,"uuid":"191792056","full_name":"emish89/smile2emoji","owner":"emish89","description":"Plugin to convert from text smile to emoticons. Emoji from punctuation","archived":false,"fork":false,"pushed_at":"2025-03-25T08:43:20.000Z","size":4293,"stargazers_count":27,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T12:08:36.244Z","etag":null,"topics":["emoji","javascript","smile","smile-detection","typescript"],"latest_commit_sha":null,"homepage":"https://codepen.io/emish89/pen/YzGrvVK","language":"TypeScript","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/emish89.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-06-13T15:49:36.000Z","updated_at":"2025-03-25T08:43:07.000Z","dependencies_parsed_at":"2023-09-27T12:27:32.697Z","dependency_job_id":"eec5fbad-e590-4b71-a1c9-1d73d6f0c556","html_url":"https://github.com/emish89/smile2emoji","commit_stats":{"total_commits":319,"total_committers":10,"mean_commits":31.9,"dds":0.7335423197492164,"last_synced_commit":"8b482b3aa8d864d277ab635513d0bf415fbb01ba"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emish89%2Fsmile2emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emish89%2Fsmile2emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emish89%2Fsmile2emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emish89%2Fsmile2emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emish89","download_url":"https://codeload.github.com/emish89/smile2emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485290,"owners_count":20946398,"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","javascript","smile","smile-detection","typescript"],"created_at":"2025-01-08T05:43:13.122Z","updated_at":"2025-04-06T13:11:58.377Z","avatar_url":"https://github.com/emish89.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Smile2Emoji NPM Module\n\n[![npm version](https://badge.fury.io/js/smile2emoji.svg)](https://badge.fury.io/js/smile2emoji)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Femish89%2Fsmile2emoji.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Femish89%2Fsmile2emoji?ref=badge_shield)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8bdab2e8ea80f30811bd/maintainability)](https://codeclimate.com/github/emish89/smile2emoji/maintainability)\n\n![smile2emoji](https://socialify.git.ci/emish89/smile2emoji/image?font=Raleway\u0026forks=1\u0026language=1\u0026owner=1\u0026stargazers=1\u0026theme=Dark)\n\n**Convert all the smiley to fantastic emoticons!** ✨\n\nWith this simple and little module you can convert the smiles in your text to emoji.\n:) or :D or \u003c3 will become emoticons!\nIdeal for input, chats and so on, where you don't want an emoji picker but a simpler solution.\n\nVery quick test usage:\nhttps://codepen.io/emish89/pen/YzGrvVK\n\nHappy usage =)\n\n# Installation\n\n```shell\nnpm i smile2emoji\n```\n\n# Usage\n\nObjects exported by the package:\n\n\n\n## FUNCTIONS EXPORTED\n\n**checkText(text: string): string**\nFunction to check if in the string parameter there is some emoji and in case convert it. \nExample:\n```js\nimport { checkText } from 'smile2emoji'\n\n...\n\nconst text = checkText(':)');\nconsole.log(text) //prints '😊'\n\n//OR\n\nconst text = checkText('i like bananas :)');\nconsole.log(text) //prints 'i like bananas 😊'\n\n```\n\n**checkTextWithAutoSuggestions(text: string): string**\nSame as before but with autosuggestion, so if there is only one emoji key in the map starting with the string, it use it.\n```js\nimport { checkTextWithAutoSuggestions } from 'smile2emoji'\n\n...\n\nconst text = checkTextWithAutoSuggestions(':tenn');\nconsole.log(text) //prints '🎾'\n\n//OR\n\nconst text = checkTextWithAutoSuggestions('i like bananas :tenn');\nconsole.log(text) //prints 'i like bananas 🎾'\n\n```\n\n**checkTextWithAutoSuggestionsAndUnicode(text: string): string**\nSame function but it use the map with unicode char instead of emoji,  same results:\n```js\nimport { checkTextWithAutoSuggestionsAndUnicode } from 'smile2emoji'\n\n...\n\nconst text = checkTextWithAutoSuggestionsAndUnicode(':tenn');\nconsole.log(text) //prints '🎾'\n\n//OR\n\nconst text = checkTextWithAutoSuggestionsAndUnicode('i like bananas :tenn');\nconsole.log(text) //prints 'i like bananas 🎾'\n\n```\n\n**fromUnicodeToEmoji(text: string): string**\nUsed by the function above, it convert an unicode string to emoji. \nExample usage:\n```js\nimport { fromUnicodeToEmoji } from 'smile2emoji'\n\nconst text = fromUnicodeToEmoji('2615');\nconsole.log(text) //prints '☕'\n\n```\n\n\n\n\n## **MAPS EXPORTED**:\n\n**emojiMap: { [key: string]: string }**\nIn this map is exported a pair of key-value  string -emoji , like ':)' -\u003e 😊\n\n**mapStringToUnicode: { [key: string]: string }**\nIn this map is exported a pair of key-value  string -unicode of the emoji , like ': coffee:' -\u003e '2615'\n\nExample usage: \n```js\nimport { emojiMap } from 'smile2emoji'\n\n...\n\nconst text = ':)';\nconst emoji = emojiMap[text];\nconsole.log(emoji) //prints '😊'\n\n```\n# License\n\nMIT © Federico Ballarini\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Femish89%2Fsmile2emoji.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Femish89%2Fsmile2emoji?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femish89%2Fsmile2emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femish89%2Fsmile2emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femish89%2Fsmile2emoji/lists"}