Readme

Usage

import {githubEmojiUrl} from "https://esm.town/v/karfau/githubEmoji"; console.log(githubEmojiUrl('+1')) //"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8"

or in a browser

<img src="https://karfau-githubEmoji.web.val.run/+1"></img>

Looks like in the preview.

curl https://karfau-githubEmoji.web.val.run/+1

(prints "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8")


If the name you pass (as argument or in the request path) is not in the list, it returns octocat

The list of names can be accessed using githubEmojiNames or by calling https://karfau-githubemoji.web.val.run/names

Code
HTTP
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
1
stevekrouse avatar

Awesome! I reformatted your REAMDE: https://www.val.town/v/stevekrouse/githubEmoji

Feel free to ignore or take from that whatever is useful.

To get the raw text of it, fork it to a new val, then edit it, and then copy and paste it where you want. We'll make this flow easier with pull requests soon!

karfau-githubemoji.web.val.run
Updated: December 8, 2023