--- Overwrites a table's value
-- @function Table.deepOverwrite
-- @tparam table target Target table
-- @tparam table source Table to read from
-- @treturn table target

local function deepOverwrite(target, source)
	for index, value in pairs(source) do
		if type(target[index]) == "table" and type(value) == "table" then
			target[index] = deepOverwrite(target[index], value)
		else
			target[index] = value
		end
	end
	return target
end
Table.deepOverwrite = deepOverwrite
