function DataStoreWriter.WriteMerge(V,l)l=l or{}for V,C in pairs(V._rawSetData)do if C==DataStoreDeleteToken then l[V]=nil else l[V]=C end end for C,x in pairs(V._writers)do if V._rawSetData[C]~=nil then warn(("\091\068\097\116\097\083\116\111\114\101\087\114\105\116\101\114\046\087\114\105\116\101\077\101\114\103\101\093 - \079\118\101\114\119\114\105\116\116\105\110\103 \107\101\121 \037\113 \097\108\114\101\097\100\121 \115\097\118\101\100 \097\115 \114\097\119\068\097\116\097 \119\105\116\104 \097 \119\114\105\116\101\114"):format(tostring(C)))end local G=x:WriteMerge(l[C])if G==DataStoreDeleteToken then l[C]=nil else l[C]=G end end return l end return DataStoreWriter

function DataStoreWriter:WriteMerge(original)
	original = original or {}

	for key, value in pairs(self._rawSetData) do
		if value == DataStoreDeleteToken then
			original[key] = nil
		else
			original[key] = value
		end
	end

	for key, writer in pairs(self._writers) do
		if self._rawSetData[key] ~= nil then
			warn(("[DataStoreWriter.WriteMerge] - Overwritting key %q already saved as rawData with a writer")
				:format(tostring(key)))
		end

		local result = writer:WriteMerge(original[key])
		if result == DataStoreDeleteToken then
			original[key] = nil
		else
			original[key] = result
		end
	end

	return original
end

return DataStoreWriter
