Skip to content

Commit

Permalink
feat: add several default safe functions
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed Jul 29, 2020
1 parent 585c539 commit 13d4a84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/sandbox.lua
Expand Up @@ -41,3 +41,9 @@ end
function getEnvironment()
return sandbox_env
end
sandbox_env['assert'] = _ENV['assert']
sandbox_env['error'] = _ENV['error']
sandbox_env['ipairs'] = _ENV['ipairs']
sandbox_env['pairs'] = _ENV['pairs']
sandbox_env['pcall'] = _ENV['pcall']

0 comments on commit 13d4a84

Please sign in to comment.