--JPType API sType = JPType.getType ( vValue ) bYes = JPType.isBoolean ( vValue ) bYes = JPType.isFunction ( vValue ) bYes = JPType.isHandle ( vValue ) bYes = JPType.isMetatable ( vValue ) bYes = JPType.isNil ( vValue ) bYes = JPType.isNumber ( vValue ) bYes = JPType.isString ( vValue ) bYes = JPType.isThread ( vValue ) sValue = JPType.toString ( vValue )
JPType is a small but very useful pack allowing you to know the type of any LUA variable.
Like LUA variables are untyped, they can contain any value, that's sometimes a problem when trying to do operation between 2 incompatible variables or when passing a parameter with a wrong type to a function of the API
Thanks to JPType, you can now know what is the type of a variable, for instance string, boolean, number etc.
JPType is available for free!