mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Add StdLib and Rank Table
This commit is contained in:
16
locale/StdLib/core.lua
Normal file
16
locale/StdLib/core.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--- Core module
|
||||
-- @module Core
|
||||
|
||||
Core = {} --luacheck: allow defined top
|
||||
|
||||
--- Errors if the variable evaluates to false, with an optional msg
|
||||
-- @param var variable to evaluate
|
||||
-- @tparam[opt='missing value'] string msg message
|
||||
function Core.fail_if_missing(var, msg)
|
||||
if not var then
|
||||
error(msg or "Missing value", 3)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return Core
|
||||
Reference in New Issue
Block a user