require ('strict');
local data = mw.loadData ('Module:Emoji/data');
--emocode|smiley}} → 1f603
When the specified name does not exist in the data table, returns the unrecognized name
If a name is not provided, returns 'smiley' (1f603)
TODO: return error messages; don't camouflage the erroneous or missing input
local function emocode (frame) local emoji_name = mw.text.trim(frame.args[1] or "") -- make sure empty and missing parameters both become the empty string emoji_name = emoji_name:lower; -- down case because names in table are all lowercase emoji_name = emoji_name:gsub ('%s+', '_'); -- replace whitespace with underscore if
--emoname|1f603}} → smiley
When the specified hexadecimal code does not exist in the data table, returns the unrecognized code
If a hexadecimal code is not provided, returns '1f603' (smiley)
TODO: return error messages; don't camouflage the erroneous or missing input
local function emoname (frame) local emoji_code = mw.text.trim(frame.args[1] or "") -- make sure empty and missing parameters both become the empty string emoji_code = emoji_code:lower; -- down case because codes in table are all lowercase if
----------------------------< E X P O R T S >----------------------------------------------------------------
return