Module:Sandbox

-- This is a sandbox for testing lua scripts. -- See Extension:Scribunto for more information.

local p = {}

function comp(x,y) return tostring(x[1])<tostring(y[1]) end function p.f(frame) local t={} for n,v in frame:argumentPairs do table.insert (t,{n,v}) end table.sort (t,comp) r = '{|class="wikitable sortable"\n!name!!value\n' for i,v in ipairs(t) do r = r..'|-\n|'..v[1]..'||'..v[2]..'\n' end r=r..'|}' return r end return p