Skip to content

Commit

Permalink
more performance is_array function
Browse files Browse the repository at this point in the history
  • Loading branch information
sekta2 committed Jan 27, 2025
1 parent dece2e2 commit 1f30918
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions res/scripts/stdmin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ function is_array(x)
return true
end

function is_array_perf(tbl)
return tbl[1] and true or false
end

-- Get entry-point and filename from `entry-point:filename` path
function parse_path(path)
local index = string.find(path, ':')
Expand Down

0 comments on commit 1f30918

Please sign in to comment.