Difference between revisions of "Module:Arguments"

Jump to navigation Jump to search
2 bytes added ,  03:13, 12 December 2013
m
tweak comment
>Mr. Stradivarius
(memoize nils, add type checks for frame and options, use string library functions instead of mw.text.trim and mw.ustring.find, define four different tidyVal functions to avoid checking options every time)
>Mr. Stradivarius
m (tweak comment)
Line 55: Line 55:


-- Get the arguments from the frame object if available. If the frame object is not available, we are being called
-- Get the arguments from the frame object if available. If the frame object is not available, we are being called
-- from another Lua module or from the debug console, so put the args in a special table so we can differentiate them.
-- from another Lua module or from the debug console, so assign the args to a new variable so we can differentiate them.
local fargs, pargs, luaArgs
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
Anonymous user

Navigation menu