模块:ArgumentsInfo
此模块的文档可以在模块:ArgumentsInfo/doc创建
local getArgs = require("Module:Arguments").getArgs
return {
getArgumentCount = function(frame)
local args = getArgs(frame)
local count = 0
for k, v in pairs(args) do count = count + 1 end
return count
end,
getNumArgumentCount = function(frame)
local args = getArgs(frame)
local count = 0
for k, v in pairs(args) do
if type(k) == "number" then count = count + 1 end
end
return count
end
}