User:Pfc19/sandbox

local p = {}

local function tableToString(t) local key local value local result result = for key, value in pairs(t) do       if (tonumber(key) ~= nil) then result = result .. ':table[' .. key .. '] is ' .. value .. '\n' else result = result .. ':table[\ ''.. key .. '\'] is ' .. value .. '\n''' end end return result end

function p.args(frame) return ';args\n' .. tableToString(frame.args) end

function p.callParserFunction(frame) return ';callParserFunction\n:' .. frame:callParserFunction('#time', 'Y-m-d H:i:s') .. '\n' end

function p.expandTemplate(frame) return ';expandTemplate\n:' .. frame:expandTemplate({title = 'Template:Sandbox', args = {'arg1', 'arg2'}}) .. '\n' end

function p.extensionTag(frame) return ';extensionTag\n:' .. frame:extensionTag('nowiki', 'text', {}) .. '\n' end

function p.getParent(frame)	frame = frame:getParent return ';getParent\n:' .. frame:getTitle .. '\n' end

function p.getTitle(frame) return ';getTitle\n:' .. frame:getTitle .. '\n' end

return p