From 5a925695bc5b403668f210e88e2186cb77ab1e5d Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 12 Nov 2021 10:26:49 +1100 Subject: [PATCH] refactor(table): change match to matches --- imports/table/shared.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/table/shared.lua b/imports/table/shared.lua index b70792a..425079e 100644 --- a/imports/table/shared.lua +++ b/imports/table/shared.lua @@ -26,7 +26,7 @@ local function contains(tbl, value) end table.contains = contains -local function match(t1, t2) +local function matches(t1, t2) if t1 == t2 then return true end if type(t1) ~= 'table' then return false end @@ -39,7 +39,7 @@ local function match(t1, t2) for _, v2 in pairs(t2) do if v == v2 then matched_values += 1 - elseif match(v, v2) then + elseif matches(v, v2) then values += 1 matched_values += #v end @@ -48,6 +48,6 @@ local function match(t1, t2) end return matched_values == values end -table.match = match +table.matches = matches return table \ No newline at end of file