Module:Spell: Difference between revisions

From Kronopolis and the Flat Plane
No edit summary
No edit summary
Line 2: Line 2:


function p.getDomainList(frame)
function p.getDomainList(frame)
     local page = 'Module:Spell/domain_' .. frame.args[0] .. '.json'
     local page = 'Module:Spell/domain_' .. frame.arg1 .. '.json'
     local data = mw.loadJsonData(page)
     local data = mw.loadJsonData(page)
     return data
     return data

Revision as of 17:47, 23 February 2023

Usage

  • {{#invoke:spell|list|domain=}}
  • {{#invoke:spell|list|category=}}

local p = {}

function p.getDomainList(frame)
    local page = 'Module:Spell/domain_' .. frame.arg1 .. '.json'
    local data = mw.loadJsonData(page)
    return data
end

return p