View source for Module:Utils

From Halopedia, the Halo wiki

You do not have permission to edit this page, for the following reason:

You do not have permission to edit pages in the Module namespace.


You can view and copy the source of this page.

local utils = {}
function utils.tableEmpty( tab )
return next( tab ) == nil
end
function utils.defaultIfEmpty( val, default )
if val == nil or val == '' or ( type( val ) == 'table' and utils.tableEmpty( val ) ) then
return default
else
return val
end
end
function utils.loadDataIfExists( name )
local success, data = pcall( mw.loadData, name )
if success then
return data
else
return nil
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Utils.