sonic-bluestreak/sonic-bluestreak.love/birb/utils/enum.lua

9 lines
141 B
Lua
Raw Permalink Normal View History

2021-11-25 10:46:15 +01:00
return function(tbl)
local length = #tbl
for i = 1, length do
local v = tbl[i]
tbl[v] = i
end
return tbl
end