Jump to content

Module:Sandbox/Wnt

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wnt (talk | contribs) at 07:07, 27 May 2014 (one-param function test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}
local getArgs = require("Module:Arguments").getArgs
function p.main(frame, k)
    local args = getArgs(frame)
    if k then
        table.insert(args, k, 1)
    end
    return "test" .. (args[1] or "") .. "test"
end
local q = { 
    __index = function (t, k)
        return p.main(frame, k)
    end
}
return p