Module:Person date: Difference between revisions
Appearance
Created page with "local p = {} function p.main(frame) local args = frame.args return args[1] or '' end return p" |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function | -- Generic passthrough | ||
local function passthrough(frame) | |||
local args = frame.args | local args = frame.args | ||
return args[1] or '' | return args[1] or '' | ||
end | |||
-- Functions expected by Infobox person | |||
function p.birth(frame) | |||
return passthrough(frame) | |||
end | |||
function p.death(frame) | |||
return passthrough(frame) | |||
end | |||
function p.age(frame) | |||
return passthrough(frame) | |||
end | |||
function p.main(frame) | |||
return passthrough(frame) | |||
end | end | ||
return p | return p | ||
Latest revision as of 08:47, 25 January 2026
Documentation for this module may be created at Module:Person date/doc
local p = {}
-- Generic passthrough
local function passthrough(frame)
local args = frame.args
return args[1] or ''
end
-- Functions expected by Infobox person
function p.birth(frame)
return passthrough(frame)
end
function p.death(frame)
return passthrough(frame)
end
function p.age(frame)
return passthrough(frame)
end
function p.main(frame)
return passthrough(frame)
end
return p