Add StdLib and Rank Table

This commit is contained in:
Cooldude2606
2017-07-01 17:20:18 +01:00
parent c96c7e85d8
commit aa3362d1ec
8 changed files with 412 additions and 6 deletions

16
locale/StdLib/core.lua Normal file
View 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