Module:FormatList
Appearance
Documentation for this module may be created at Module:FormatList/doc
local p = {}
function p.data( frame )
return p._impl(frame.args[1])
end
function p.dbg( frame )
return mw.text.jsonEncode( mw.ext.data.get( frame.args[1], frame.args[2] ), mw.text.JSON_PRETTY )
end
function p._impl( page )
local result = {}
for key, row in pairs(mw.ext.data.get(page).data) do
table.insert(result, "* '''" .. row[0] .. "''': " .. row[1] .. " in stock<br>" )
end
return table.concat(result, "\n")
end
return p