Please sign in to edit, using the button at the upper right corner of the page.


Module:Sandbox: Difference between revisions

From Gunn Wiki
Jump to navigation Jump to search
better
test
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
-- Test stuff here.
-- Test stuff here.
local getArgs = require('Module:Arguments').getArgs
local globSandboxVal = ""
local globSandboxVal = ""


local p = {}
local p = {}
function p.getSandboxVal(frame)
function p.getSandboxVal(frame)
     return globSandboxVal
     return "Get " .. globSandboxVal
end
end


Line 14: Line 16:
     })
     })
     globSandboxVal = args[1]
     globSandboxVal = args[1]
    return "Set " .. globSandboxVal
end
end


return p
return p

Latest revision as of 22:08, 28 September 2021

Documentation for this module may be created at Module:Sandbox/doc

-- Test stuff here.
local getArgs = require('Module:Arguments').getArgs

local globSandboxVal = ""

local p = {}
function p.getSandboxVal(frame)
    return "Get " .. globSandboxVal
end

function p.setSandboxVal(frame)
    local args = getArgs(frame, {
        valueFunc = function(key, value)
            return value
        end
    })
    globSandboxVal = args[1]
    return "Set " .. globSandboxVal
end

return p