type check utility module.
luarocks install isathe following functions can also be called by the following lower-case aliases;
isa.Nil:isa.nilisa.Boolean:isa.booleanisa.String:isa.stringisa.Number:isa.numberisa.Function:isa.functionisa.Func:isa.funcisa.Table:isa.tableisa.Thread:isa.threadisa.Userdata:isa.userdataisa.File:isa.fileisa.Callable:isa.callableisa.True:isa.trueisa.False:isa.falseisa.None:isa.noneisa.NaN:isa.nanisa.Finite:isa.finiteisa.Int:isa.intisa.Int8:isa.int8isa.Int16:isa.int16isa.Int32:isa.int32isa.Unsigned:isa.unsignedisa.UInt:isa.uintisa.UInt8:isa.uint8isa.UInt16:isa.uint16isa.UInt32:isa.uint32
the function determines whether a value is nil or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isnil; otherwise,false.
the function determines whether a value is boolean or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isboolean; otherwise,false.
the function determines whether a value is string or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isstring; otherwise,false.
the function determines whether a value is number or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isnumber; otherwise,false.
the function determines whether a value is function or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isfunction; otherwise,false.
the function determines whether a value is table or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value istable; otherwise,false.
the function determines whether a value is thread or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isthread; otherwise,false.
the function determines whether a value is userdata or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isuserdata; otherwise,false.
the function determines whether a value is file or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isfile; otherwise,false.
the function determines whether a value is function or has a __call metamethod.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isfunctionor has a__callmetamethod; otherwise,false.
the function determines whether a value is true or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value istrue; otherwise,false.
the function determines whether a value is false or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isfalse; otherwise, false.
the function determines whether a value is none or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isnil,false,0,''(empty-string)ornan; otherwise,false.
the function determines whether a value is nan or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isnan; otherwise,false.
the function determines whether a value is finite or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isfinite; otherwise,false.
the function determines whether a value is int or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isint; otherwise,false.
the function determines whether a value is int8 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isint8; otherwise,false.
the function determines whether a value is int16 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isint16; otherwise,false.
the function determines whether a value is int32 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isint32; otherwise,false.
the function determines whether a value is unsigned or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isunsigned; otherwise,false.
the function determines whether a value is uint or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isuint; otherwise,false.
the function determines whether a value is uint8 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isuint8; otherwise,false.
the function determines whether a value is uint16 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isuint16; otherwise,false.
the function determines whether a value is uint32 or not.
Parameters
val:any: value to be tested.
Returns
ok:boolean:trueif the given value isuint32; otherwise,false.