From 13b44b5aa02c6caeeeb0678f593753658e8fc58a Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:30:29 +0100 Subject: [PATCH] feat(es_extended/shared/modules/table): add ESX.Table.Wipe --- [core]/es_extended/shared/modules/table.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/shared/modules/table.lua b/[core]/es_extended/shared/modules/table.lua index aacb25840..ab4b147d8 100644 --- a/[core]/es_extended/shared/modules/table.lua +++ b/[core]/es_extended/shared/modules/table.lua @@ -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 \ No newline at end of file