Module:UtilsPackage

local p = {}

local utilsTable = require("Module:UtilsTable")

function p.submodules(submodules, sectionHeadings) local module = {} local moduleDoc = {} for i, submodulePage in ipairs(submodules) do		local submodule = require(submodulePage) for exportKey, export in pairs(submodule) do			if exportKey == "Schemas" then module.Schema = utilsTable.merge({}, module.Schema, submodule.Schema) elseif module[exportKey] and exportKey ~= "Documentation" then mw.addWarning(string.format("Module conflict:  is exported by more than one submodule.", exportKey)) end module[exportKey] = export end moduleDoc[i] = { heading = sectionHeadings and sectionHeadings[i], section = submodulePage, }	end module.Documentation = { sections = moduleDoc } return module end

return p