Jump to content

Module:Module sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Tag: Reverted
Reset sandbox
Line 1: Line 1:
--- {{Module sandbox heading}}
--[[
--
Add your experimental module code here.
-- @module sandbox
]]
-- @alias p

local p = {}

--- Prints hello world
-- @function p.hello_world
-- @todo make it say "Hello, [name]".
-- @param {string} name Person to address
-- @return hello world string
p.hello_world = function(name)
return "Hello world!"
end

--- Main entrypoint.
-- @function p.main
-- @param {table} frame calling frame
-- @return output wikitext
p.main = function(frame)
local args = frame.args
return p.hello_world(args[1] or "")
end

return p

Revision as of 10:36, 6 April 2025

--- {{Module sandbox heading}}
--
-- @module sandbox
-- @alias p

local p = {}

--- Prints hello world
-- @function p.hello_world
-- @todo make it say "Hello, [name]".
-- @param {string} name Person to address
-- @return hello world string
p.hello_world = function(name)
	return "Hello world!"
end

--- Main entrypoint.
-- @function p.main
-- @param {table} frame calling frame
-- @return output wikitext
p.main = function(frame)
	local args = frame.args
	return p.hello_world(args[1] or "")
end

return p