Usage
{{#invoke:spell|list|domain=}}
{{#invoke:spell|list|category=}}
local p = {}
function p.getDomainList(frame)
local json = frame.args[1]
json = firstToUpper(json)
json = 'Module:Spell/Domain/' .. json .. '.json'
local data = mw.loadJsonData(json)
local out = {}
for idx = 1, 5 do
table.insert(out, idx)
end
return table.concat(out, "<br>")
end
function firstToUpper(str)
return (str:gsub("^%l", string.upper))
end
return p