Changes
avoid using local variables to save table lookups per Jackmcbarn's suggestion, and because this will be cached with mw.loadData so performance of this function is not such a worry
-- }
--]]
local mappings = {}
if nsid ~= 0 then -- Exclude main namespace.
local nsname = ustringLower(ns.name) local canonicalName = ustringLower(ns.canonicalName) mappings[nsname] = {mw.ustring.lower(nsname)}
if canonicalName ~= nsname then
end
for _, alias in ipairs(ns.aliases) do
end
end