View source for Module:LibraryUtil
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- <nowiki>
local libraryUtil = require( 'libraryUtil' )
-- libraryUtil is a standard scribunto module, the following commented out code is just to show what is inside it. Documentation about these functions can be found at https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#libraryUtil
--[=[
local libraryUtil = {}
function libraryUtil.checkType( name, argIdx, arg, expectType, nilOk )
if arg == nil and nilOk then
return
end
if type( arg ) ~= expectType then
local msg = string.format( "bad argument #%d to '%s' (%s expected, got %s)",
argIdx, name, expectType, type( arg )
)
error( msg, 3 )
end
end
function libraryUtil.checkTypeMulti( name, argIdx, arg, expectTypes )
000
1:0
Templates used on this page:
- Template:DependencyList (view source)
- Template:Documentation (view source)
- Template:No documentation (view source)
- Template:PageType (view source)
- Module:Array (view source)
- Module:DPLlua (view source)
- Module:DependencyList (view source)
- Module:Documentation (view source)
- Module:LibraryUtil/doc (view source)
- Module:Paramtest (view source)
- Module:Tooltip (view source)
- Module:Yesno (view source)
Return to Module:LibraryUtil.