unpack method
Lua tables returned by functions whose field length is of size 1 can be unpacked into a single lua object.
Implementation
LuaObject? unpack() {
if (isTable && length == 1 && hasField("1")) {
return readField("1")?.makeLuaRef();
}
return LuaObject.nil(id);
}