<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atable%2FshallowCopy</id>
	<title>Module:table/shallowCopy - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atable%2FshallowCopy"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/shallowCopy&amp;action=history"/>
	<updated>2026-04-06T03:30:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:table/shallowCopy&amp;diff=475298&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local next = next local pairs = pairs local type = type  --[==[ Returns a clone of an object. If the object is a table, the value returned is a new table, but all subtables and functions are shared. Metamethods are respected unless the `raw` flag is set, but the returned table will have no metatable of its own.]==] return function(orig, raw) 	if type(orig) ~= &quot;table&quot; then 		return orig 	end 	local copy, iter, state, init = {} 	if raw then 		iter, state = next, orig 	else...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/shallowCopy&amp;diff=475298&amp;oldid=prev"/>
		<updated>2025-11-04T21:37:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local next = next local pairs = pairs local type = type  --[==[ Returns a clone of an object. If the object is a table, the value returned is a new table, but all subtables and functions are shared. Metamethods are respected unless the `raw` flag is set, but the returned table will have no metatable of its own.]==] return function(orig, raw) 	if type(orig) ~= &amp;quot;table&amp;quot; then 		return orig 	end 	local copy, iter, state, init = {} 	if raw then 		iter, state = next, orig 	else...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local next = next&lt;br /&gt;
local pairs = pairs&lt;br /&gt;
local type = type&lt;br /&gt;
&lt;br /&gt;
--[==[&lt;br /&gt;
Returns a clone of an object. If the object is a table, the value returned is a new table, but all subtables and functions are shared. Metamethods are respected unless the `raw` flag is set, but the returned table will have no metatable of its own.]==]&lt;br /&gt;
return function(orig, raw)&lt;br /&gt;
	if type(orig) ~= &amp;quot;table&amp;quot; then&lt;br /&gt;
		return orig&lt;br /&gt;
	end&lt;br /&gt;
	local copy, iter, state, init = {}&lt;br /&gt;
	if raw then&lt;br /&gt;
		iter, state = next, orig&lt;br /&gt;
	else&lt;br /&gt;
		iter, state, init = pairs(orig)&lt;br /&gt;
	end&lt;br /&gt;
	for k, v in iter, state, init do&lt;br /&gt;
		copy[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return copy&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>