Module:Utils

local getArgs = require('Dev:Arguments').getArgs

return { make_wrapper_function = function(func) return function(frame) return func(getArgs(frame)) end end; -- This function is meant to be called with the names of the namespaces that pages can be categorized in. -- It will return a function to be used to categorize pages, which accepts any number of category names. categorize = function(...) local namespaces = {...} return function(...) local result = '' if mw.title.getCurrentTitle:inNamespaces(unpack(namespaces)) then for _, category in next, {...} do result = result .. ""				end end return result end end; }