Parameters
Returns
table - The safe environment table.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
debug.getsafeenv(func: function): table
| Parameter | Type | Description |
|---|---|---|
func | function | The target function to inspect. |
table - The safe environment table.
local env = debug.getsafeenv(print)
print("Safe env type: ", type(env))
local env = debug.getsafeenv(function() end)
assert(env == getgenv(), "Local functions should share executor environment by default")