View source for Module:Fun
MyWikiBiz, Author Your Legacy — Wednesday June 04, 2025
Jump to navigationJump to searchYou do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
local ustring = mw.ustring
local libraryUtil = require "libraryUtil"
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti
local iterableTypes = { "table", "string" }
local _checkCache = {}
local function _check(funcName, expectType)
if type(expectType) == "string" then
return function(argIndex, arg, nilOk)
return checkType(funcName, argIndex, arg, expectType, nilOk)
end
else
-- Lua 5.1 doesn't cache functions as Lua 5.3 does.
local checkFunc = _checkCache[funcName]
or function(argIndex, arg, expectType, nilOk)
if type(expectType) == "table" then
if not (nilOk and arg == nil) then
000
1:0
Template used on this page:
Return to Module:Fun.