Module:table/shallowCopy: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

4 November 2025

  • curprev 21:3721:37, 4 November 2025Sware talk contribs 584 bytes +584 Created page with "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) ~= "table" then return orig end local copy, iter, state, init = {} if raw then iter, state = next, orig else..."