1,586 bytes added
, 21:25, 15 July 2021
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
[[Module:Emoji]] implements two functions:
; emocode : It takes one unnamed parameter, the name of the emoji, and returns the hex code for the corresponding emoji. If no name is supplied it uses "smiley" as the default (and returns <code>1f603</code>).
; emoname : It takes one unnamed parameter, the hex code of the emoji, and returns the name for the corresponding emoji. If no name is supplied it uses "1f603" as the default (and returns <code>smiley</code>).
It stores the mapping from name to code in [[Module:Emoji/data]], which internally generates the reverse lookup table from code to name.
== Examples ==
* <code><nowiki>{{#invoke:Emoji | emocode | wink}}</nowiki></code> → <code>{{#invoke:Emoji | emocode | wink}}</code>
* <code><nowiki>{{#invoke:Emoji | emocode | grin}}</nowiki></code> → <code>{{#invoke:Emoji | emocode | grin}}</code>
* <code><nowiki>{{#invoke:Emoji | emocode | 8ball}}</nowiki></code> → <code>{{#invoke:Emoji | emocode | 8ball}}</code>
* <code><nowiki>{{#invoke:Emoji | emocode }}</nowiki></code> → <code>{{#invoke:Emoji | emocode }}</code>
* <code><nowiki>{{#invoke:Emoji | emoname | 1f62b}}</nowiki></code> → <code>{{#invoke:Emoji | emoname | 1f62b}}</code>
* <code><nowiki>{{#invoke:Emoji | emoname }}</nowiki></code> → <code>{{#invoke:Emoji | emoname }}</code>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>