{"id":13758431,"url":"https://github.com/JamesFrost/twitch-emoji","last_synced_at":"2025-05-10T08:30:34.468Z","repository":{"id":57382805,"uuid":"68026974","full_name":"JamesFrost/twitch-emoji","owner":"JamesFrost","description":"Parse Twitch emotes","archived":false,"fork":false,"pushed_at":"2017-12-11T20:23:00.000Z","size":53088,"stargazers_count":11,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T15:49:00.087Z","etag":null,"topics":["channel-emojis","emoji","emotes","kappa","twitch","twitch-tv"],"latest_commit_sha":null,"homepage":"http://jamesfrost.me/twitch-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/JamesFrost.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":"2016-09-12T16:31:00.000Z","updated_at":"2022-03-15T21:20:47.000Z","dependencies_parsed_at":"2022-09-01T04:01:49.400Z","dependency_job_id":null,"html_url":"https://github.com/JamesFrost/twitch-emoji","commit_stats":null,"previous_names":[],"tags_count":212,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesFrost%2Ftwitch-emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesFrost%2Ftwitch-emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesFrost%2Ftwitch-emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesFrost%2Ftwitch-emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesFrost","download_url":"https://codeload.github.com/JamesFrost/twitch-emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389418,"owners_count":21900757,"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":["channel-emojis","emoji","emotes","kappa","twitch","twitch-tv"],"created_at":"2024-08-03T13:00:30.098Z","updated_at":"2025-05-10T08:30:29.459Z","avatar_url":"https://github.com/JamesFrost.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":["JavaScript (Node.js)"],"readme":"# twitch-emoji :zap: \u003cimg src=\"https://travis-ci.org/JamesFrost/twitch-emoji.svg?branch=master\"\u003e\nParse Twitch emojis.\n\nPowered by \u003ca href=\"https://twitchemotes.com\"\u003etwitchemotes.com\u003c/a\u003e.\n\n```bash\nnpm install --save twitch-emoji\n```\n\n```html\n\u003cscript src=\"https://unpkg.com/twitch-emoji@^0.2.0/dist/twitchemoji.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n### Browser\n\nFor use client side, I recommend using the above CDN. 'Requiring' the module and then using a build task like browserify will add ~4mb to your final file size. This is because the node module has all channel specific emojis preloaded.\n\nUsing the cdn will allow you to dynamically load channel specific emojis, meaining you won't add 4mb of (mostly) redundant JSON to your Javascript.\n\nThe browser module has global emojis preloaded.\n\n#### API\n##### ``` .parse( text [, options ]) ```\n\n###### options.emojiSize\nSmall, medium or large. Default is medium.\n\n###### options.channel\nUsed to parse channel specific emojis. Note that the channel emojis must be \u003ca href=\"https://github.com/JamesFrost/twitch-emoji#add-channelname--callback-\"\u003eadded\u003c/a\u003e first.\n\n```js\nconsole.log( twitchEmoji.parse( 'spicey memes Kappa' ), { emojiSize : 'medium' } );\n\n// Will produce:\n/*\nspicey memes \u003cimg class=\"twitch-emoji twitch-emoji-medium\" src=\"https://static-cdn.jtvnw.net/emoticons/v1/25/2.0\"/\u003e\n*/\n```\n##### ``` .add( channelName [, callback] ) ```\n\nLoad a channel specific emoji set.\n\n###### channelName\nThe name of the channel to load the emoji set for.\n\n###### callback\nOptional. Has a single error argument.\n\n\nReturns a promise.\n\nAn error will be passed to the callback, and the promise rejected if the channel doesn't have specific emoji sets.\n\n```js\n  // Using the callback\n  twitchEmoji.add('twoeasy', function( err )\n  {\n      if( !err )\n        // Emoji Set Usable\n  });\n  \n  // Using a promise\n  twitchEmoji.add('twoeasy').then(\n    function( response )\n    {\n       // Emoji Set Usable\n    },\n    function( response )\n    {\n      // Emoji set not accessable/doesn't exist\n    }\n  );\n```\n\n### Node\n\n#### API\n\n##### ``` .parse( text [, options ]) ```\n\n###### options.emojiSize\nSmall, medium or large. Default is medium.\n\n###### options.channel\nUsed to parse channel specific emojis.\n\n```js\nconsole.log( twitchEmoji.parse( 'spicey memes Kappa' , { emojiSize : 'medium' } ) );\n\n// Will produce:\n/*\nspicey memes \u003cimg class=\"twitch-emoji twitch-emoji-medium\" src=\"https://static-cdn.jtvnw.net/emoticons/v1/25/2.0\"/\u003e\n*/\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJamesFrost%2Ftwitch-emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJamesFrost%2Ftwitch-emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJamesFrost%2Ftwitch-emoji/lists"}