Editing Module:User:Kai/sandboxGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
local p = {} | |||
function p.view(frame) | |||
local t = {} | |||
table.insert(t, "mw.ext.bucket methods:") | |||
for k, v in pairs(mw.ext.bucket) do | |||
table.insert(t, string.format("mw.ext.bucket[%s] = %s", tostring(k), type(v))) | |||
end | |||
local inst = mw.ext.bucket('feedback') | |||
table.insert(t, "\nmw.ext.bucket('feedback') keys:") | |||
for k, v in pairs(inst) do | |||
table.insert(t, string.format("inst[%s] = %s", tostring(k), type(v))) | |||
end | |||
local meta = getmetatable(inst) | |||
if meta then | |||
table.insert(t, "\ninst metatable keys:") | |||
for k, v in pairs(meta) do | |||
table.insert(t, string.format("meta[%s] = %s", tostring(k), type(v))) | |||
end | |||
end | |||
if _G.bucket then | |||
table.insert(t, "\n_G.bucket exists (" .. type(_G.bucket) .. ")") | |||
end | |||
return "<pre>" .. table.concat(t, "\n") .. "</pre>" | |||
end | |||
return p | |||