Skip to content

Commit

Permalink
feat(es_extended/shared/modules/table): add ESX.Table.Wipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshiin13 committed Jan 5, 2025
1 parent 81b040d commit 13b44b5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions [core]/es_extended/shared/modules/table.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,18 @@ function ESX.Table.Sort(t, order)
end
end

function ESX.Table.ToArray(table)
---@param t table
---@return Array
function ESX.Table.ToArray(t)
local array = {}
for _, v in pairs(table) do
for _, v in pairs(t) do
array[#array + 1] = v
end
return array
end

---@param t table
---@return table
function ESX.Table.Wipe(t)
return table.wipe(t)
end

0 comments on commit 13b44b5

Please sign in to comment.