Table: remove extra spaces and tabs

This commit is contained in:
Van
2025-09-03 19:05:59 +00:00
parent 8085541d24
commit 8cf50b90d0

View File

@@ -63,7 +63,7 @@ end
local tableContains = table.contains local tableContains = table.contains
--- Checks if the table `t` contains the specified key. Returns `true` if the key is found at least once, `false` otherwise. --- Checks if the table `t` contains the specified key. Returns `true` if the key is found at least once, `false` otherwise.
--- Use when you need to check for key, avoiding metamethods intervention. --- Use when you need to check for key, avoiding metamethods intervention.
--- @param t table<any, any> | any[] Table to check --- @param t table<any, any> | any[] Table to check
--- @param key any Value to compare against --- @param key any Value to compare against
--- @return boolean --- @return boolean
@@ -139,7 +139,7 @@ local function mergeInPlace(target, source, recursively)
for key, value in pairs(source) do for key, value in pairs(source) do
local targetValue = target[key] local targetValue = target[key]
local valueType = type(value) local valueType = type(value)
if targetValue == nil then if targetValue == nil then
-- Add new key with deep copy if needed -- Add new key with deep copy if needed
target[key] = (valueType == 'table') and tableCopy(value) or value target[key] = (valueType == 'table') and tableCopy(value) or value
@@ -357,4 +357,4 @@ function table.divide_values(t1, t2, empty_value)
return a / b return a / b
end end
return operateValues(t1, t2, empty_value or 1, operation) return operateValues(t1, t2, empty_value or 1, operation)
end end