首页
历史
最近更改
特殊页面
社群首页
设置
关于Vocawiki
免责声明
Vocawiki
搜索
用户菜单
创建账号
登录
查看“︁Module:SortArgs”︁的源代码
←
Module:SortArgs
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local module = {} function module.sortedArgs(args, sort_ref, ref_sep) local args_dump = {} sort_ref = mw.text.split(sort_ref, ref_sep, false) if #sort_ref then table.remove(sort_ref, #sort_ref) end for idx, key in ipairs(sort_ref) do args_dump[idx] = { key, args[key] or args[tonumber(key)] } end local index = 0 return function () index = index + 1 if not args_dump[index] then index = 0 return nil end return unpack(args_dump[index]) end end return module
该页面使用的模板:
Module:SortArgs/doc
(
查看源代码
)
返回
Module:SortArgs
。