Content deleted Content added
BrandonXLF (talk | contribs) Module to show exports of string modules |
BrandonXLF (talk | contribs) Account for skipped outputs |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1:
local p = {}
local TableTools = require('Module:TableTools')
local getArgs = require('Module:Arguments').getArgs
function p.exports(frame)
local
local title = args[1] or mw.title.getCurrentTitle().fullText
local keys = TableTools.keysToList(moduleExports, function (a, b)▼
return string.lower(a) < string.lower(b)
end)
local outputKeys = {}
for _, v in ipairs(keys) do
if not args.exclude or not v:match(args.exclude) then
table.insert(outputKeys, '<code><span style="white-space: pre;">' .. v .. '</span></code>')
end
end
▲ local moduleExports = require(currentTitle.fullText)
▲ local keys = TableTools.keysToList(moduleExports)
▲ return 'Exported types: ' .. mw.text.listToText(keys)
end
|