type check utility module.
luarocks install isa
the following functions can also be called by the following lower-case aliases;
isa.Nil
:isa.nil
isa.Boolean
:isa.boolean
isa.String
:isa.string
isa.Number
:isa.number
isa.Function
:isa.function
isa.Func
:isa.func
isa.Table
:isa.table
isa.Thread
:isa.thread
isa.Userdata
:isa.userdata
isa.File
:isa.file
isa.Callable
:isa.callable
isa.True
:isa.true
isa.False
:isa.false
isa.None
:isa.none
isa.NaN
:isa.nan
isa.Finite
:isa.finite
isa.Int
:isa.int
isa.Int8
:isa.int8
isa.Int16
:isa.int16
isa.Int32
:isa.int32
isa.Unsigned
:isa.unsigned
isa.UInt
:isa.uint
isa.UInt8
:isa.uint8
isa.UInt16
:isa.uint16
isa.UInt32
:isa.uint32
the function determines whether a value is nil
or not.
Parameters
val:any
: value to be tested.
Returns
ok:boolean
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if the given value isfunction
or has a__call
metamethod; otherwise,false
.
the function determines whether a value is true
or not.
Parameters
val:any
: value to be tested.
Returns
ok:boolean
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if the given value isfinite
; otherwise,false
.
the function
7DD6
determines whether a value is int
or not.
Parameters
val:any
: value to be tested.
Returns
ok:boolean
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if 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
:true
if the given value isuint32
; otherwise,false
.