StdLib.Utils.Is.Methods
Shared predicate methods exposed through Is, Is.Not, Is.Assert, and Is.Assert.Not.
Methods83
function Methods.Table(var: any) -> any
Returns the var if the passed variable is a table.
varanyThe variable to check
- any
function Methods.table(var: any) -> any
varanyThe variable to check
- any
function Methods.String(var: any) -> any
Returns the var if the passed variable is a string.
varanyThe variable to check
- any
function Methods.string(var: any) -> any
varanyThe variable to check
- any
function Methods.Number(var: any) -> any
Returns the var if the passed variable is a number.
varanyThe variable to check
- any
function Methods.number(var: any) -> any
varanyThe variable to check
- any
function Methods.Thread(var) -> false | thread
function Methods.thread(var) -> false | thread
function Methods.Userdata(var) -> false | userdata
function Methods.userdata(var) -> false | userdata
function Methods.Nil(var: any) -> boolean
Returns true if the passed variable is nil.
varanyThe variable to check
- boolean
function Methods.is_nil(var: any) -> boolean
varanyThe variable to check
- boolean
function Methods.Boolean(var: any) -> boolean
Returns true if the passed variable is a boolean.
varanyThe variable to check
- boolean
function Methods.True(var: any) -> boolean
Returns true if the passed variable is true
varanyThe variable to check
- boolean
function Methods.is_true(var: any) -> boolean
varanyThe variable to check
- boolean
function Methods.Truthy(var: any) -> any
Returns the var if the passed variable is not nil or false.
varanyThe variable to check
- any
function Methods.truthy(var: any) -> any
varanyThe variable to check
- any
function Methods.False(var: any) -> boolean
Returns true if the passed variable is false.
varanyThe variable to check
- boolean
function Methods.is_false(var: any) -> boolean
varanyThe variable to check
- boolean
function Methods.Falsy(var: any) -> boolean
Returns true if the passed variable is false or nil.
varanyThe variable to check
- boolean
function Methods.falsy(var: any) -> boolean
varanyThe variable to check
- boolean
function Methods.Empty(var: any) -> boolean
Returns true if the passed variable is nil, an empty table, or an empty string.
varanyThe variable to check
- boolean
function Methods.empty(var: any) -> boolean
varanyThe variable to check
- boolean
function Methods.None(var) -> boolean
function Methods.none(var) -> boolean
function Methods.Positive(var: any) -> any
Returns the passed var if it is positive.
varanyThe variable to check
- any
function Methods.positive(var: any) -> any
varanyThe variable to check
- any
function Methods.odd(var: any) -> any
Returns the passed var if it is odd.
varanyThe variable to check
- any
function Methods.even(var: any) -> any
Returns the passed var if it is even.
varanyThe variable to check
- any
function Methods.Negative(var: any) -> any
Returns the passed var if it is negative.
varanyThe variable to check
- any
function Methods.negative(var: any) -> any
varanyThe variable to check
- any
function Methods.NaN(var: any) -> any
Returns the passed var if it is not a number.
varanyThe variable to check
- any
function Methods.nan(var: any) -> any
varanyThe variable to check
- any
function Methods.Finite(var: any) -> any
Returns the passed var if it is finite.
varanyThe variable to check
- any
function Methods.finite(var: any) -> any
varanyThe variable to check
- any
function Methods.Int(var: any) -> any
Returns the passed var if it is an int.
varanyThe variable to check
- any
function Methods.int(var: any) -> any
varanyThe variable to check
- any
function Methods.Int8(var: any) -> any
Returns the passed var if it is an int8.
varanyThe variable to check
- any
function Methods.int8(var: any) -> any
varanyThe variable to check
- any
function Methods.Int16(var: any) -> any
Returns the passed var if it is an int16.
varanyThe variable to check
- any
function Methods.int16(var: any) -> any
varanyThe variable to check
- any
function Methods.Int32(var: any) -> any
Returns the passed var if it is an int32.
varanyThe variable to check
- any
function Methods.int32(var: any) -> any
varanyThe variable to check
- any
function Methods.Unsigned(var: any) -> any
Returns the passed var if it is an unsigned int.
varanyThe variable to check
- any
function Methods.unsigned(var: any) -> any
varanyThe variable to check
- any
function Methods.UInt(var: any) -> any
Returns the passed var if it is an unsigned int.
varanyThe variable to check
- any
function Methods.uint(var: any) -> any
varanyThe variable to check
- any
function Methods.UInt8(var: any) -> any
Returns the passed var if it is an unsigned int8.
varanyThe variable to check
- any
function Methods.uint8(var: any) -> any
varanyThe variable to check
- any
function Methods.UInt16(var: any) -> any
Returns the passed var if it is an unsigned int16.
varanyThe variable to check
- any
function Methods.uint16(var: any) -> any
varanyThe variable to check
- any
function Methods.UInt32(var: any) -> any
Returns the passed var if it is an unsigned int32.
varanyThe variable to check
- any
function Methods.uint32(var: any) -> any
varanyThe variable to check
- any
function Methods.Float(var: any) -> any
Returns the passed var if it is a float.
varanyThe variable to check
- any
function Methods.float(var: any) -> any
varanyThe variable to check
- any
function Methods.Position(var: any) -> any
Returns the passed var if it is a full position.
varanyThe variable to check
- any
function Methods.position(var: any) -> any
varanyThe variable to check
- any
function Methods.Area(var: any) -> any
Returns the passed var if it is a full area.
varanyThe variable to check
- any
function Methods.area(var: any) -> any
varanyThe variable to check
- any
function Methods.Vector(var: any) -> any
Returns the passed var if it is a simple position/vector.
varanyThe variable to check
- any
function Methods.vector(var: any) -> any
varanyThe variable to check
- any
function Methods.BoundingBox(var: any) -> any
Returns the passed var if it is a simple area/boundingbox.
varanyThe variable to check
- any
function Methods.boundingbox(var: any) -> any
varanyThe variable to check
- any
function Methods.bounding_box(var: any) -> any
varanyThe variable to check
- any
function Methods.Bounding_Box(var: any) -> any
varanyThe variable to check
- any
function Methods.Hex(var: any) -> any
Returns the hex value of the passed var if it is hexadecimal.
varanyThe variable to check
- any
function Methods.hex(var: any) -> any
varanyThe variable to check
- any
function Methods.StrictWord(var: any) -> boolean
Returns true if the passed variable is a single alphbetical word. Does not allow any special chars
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.strict_word(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.AlphabetWord(var: any) -> boolean
Returns true if the passed variable is a single alphbetical word. Allows _ and - as part of the word
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.Word(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.AlphanumWord(var: any) -> boolean
Returns true if the passed variable is a single alphbetical word. Must start with a letter, allows _ and - as part of the word
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.Alpha(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.alpha(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.alphanumword(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a single alphbetical word
function Methods.Object(var: any) -> LuaObject | nil
Is this a factorio object
varanyThe variable to check
- LuaObject | nil
the var if this is an LuaObject
function Methods.object(var: any) -> LuaObject | nil
varanyThe variable to check
- LuaObject | nil
the var if this is an LuaObject
function Methods.Valid(var: any) -> any
Is this factorio object valid
varanyThe variable to check
- any
the var if this is a valid LuaObject
function Methods.valid(var: any) -> any
varanyThe variable to check
- any
the var if this is a valid LuaObject
function Methods.Callable(var: any) -> boolean
Returns true if the passed variable is a callable function.
varanyThe variable to check
- boolean
true if the passed variable is a callable function
function Methods.callable(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a callable function
function Methods.Function(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a callable function
function Methods.is_function(var: any) -> boolean
varanyThe variable to check
- boolean
true if the passed variable is a callable function
Fields1
Methods.boolean : any