Module:Emoji/doc: Difference between revisions
From Kenshi Wiki
More actions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 13: | Line 13: | ||
* <code><nowiki>{{#invoke:Emoji | emocode }}</nowiki></code> → <code>{{#invoke:Emoji | emocode }}</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 | 1f62b}}</nowiki></code> → <code>{{#invoke:Emoji | emoname | 1f62b}}</code> | ||
* <code><nowiki>{{#invoke:Emoji | emoname }}</nowiki></code> → <code>{{Emoji | emoname }}</code> | * <code><nowiki>{{#invoke:Emoji | emoname }}</nowiki></code> → <code>{{ Emoji | emoname }}</code> | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
Revision as of 03:29, 4 March 2025
| This is a documentation subpage for Module:Emoji. It may contain usage information, categories and other content that is not part of the original module page. |
Module:Emoji implements two functions:
- emocode
- 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
1f603). - emoname
- 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
smiley).
It stores the mapping from name to code in Module:Emoji/data, which internally generates the reverse lookup table from code to name.
Examples
{{#invoke:Emoji | emocode | wink}}→1f609{{#invoke:Emoji | emocode | grin}}→1f601{{#invoke:Emoji | emocode | 8ball}}→1f3b1{{#invoke:Emoji | emocode }}→1f603{{#invoke:Emoji | emoname | 1f62b}}→tired_face{{#invoke:Emoji | emoname }}→moname;