查看“︁Module:Arguments”︁的源代码
外观
因为以下原因,您没有权限编辑该页面:
您可以查看和复制此页面的源代码。
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. 该模块旨在为其他Lua模块所用,它不应该被#invoke直接调用。
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
000
1:0
该页面使用的模板: