Skip to main content

rawget

Function rawget 

Source
pub fn rawget(t: table, index: any) -> any
Expand description

Gets the real value of t[index], without using the __index metamethod. t must be a table.

§Examples

local t = setmetatable({}, { __index = function() return "fallback" end })
print(t.missing)             --> fallback
print(rawget(t, "missing"))  --> nil