Module:Util/tables/concat/Documentation/Spec: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search
m (PhantomCaleb moved page Module:Util/Table/concat/Documentation/Spec to Module:Util/tbl/concat/Documentation/Spec without leaving a redirect)
m (PhantomCaleb moved page Module:Util/tbl/concat/Documentation/Spec to Module:Util/tables/concat/Documentation/Spec without leaving a redirect)
 
(No difference)

Latest revision as of 17:37, 5 May 2024

Documentation for this module may be created at Module:Util/tables/concat/Documentation/Spec/Documentation

local p = {}

function p.Documentation()
	return {
		params = {"array", "..."},
		returns = "Creates a new array concatenating array with any additional arrays and/or values.",
		cases = {
			{
				snippet = 1,
				expect = {1, 2, 3, 4, {5}, 6},
			},
			{
				desc = "Tables with only string keys are treated as single values.",
				args = {{}, {1, 2}, {3, 4, foo = "bar"}, { foo = "quux" }},
				expect = {1, 2, 3, 4, { foo = "quux" }},
			},
		},
	}
end

return p