Anonymous user
Module:User: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
deal with nil values properly
(see if we get a significant speed boost by porting {{user}} directly to Lua) |
(deal with nil values properly) |
||
Line 6:
local function validateArg(arg)
if not arg then
return nil
end
arg = arg:match('^%s*(.-)%s*$')
if arg ~= '' then
Line 34 ⟶ 37:
for argKey, t in pairs(argKeys) do
for i, origArgKey in ipairs(t) do
local value =
value = validateArg(value)
if value then
args[argKey] = value
|