Module:Table/doc

This module is a meta-module designed for use with lua tables.

Loading the module
To load this module and make its method available for use, Add this line of code to the start of your module:

All methods described below will be available under the loaded table.

Alternatively, you can use this module using the code below by using Module:LoadLib. Note that this module is an implicitly loaded module by this function, and does not need to be added to the loader query.

Depending on the settings you used in, the methods of this module may be available under their respective variables in the module this module was loaded in.

Methods
All methods are available below as fields under the required object name.

table.merge
This method returns the sum of all tables in joined together in the new tables. If any key in is not a table, it is appended to the table like. .

table.length
This method returns the total number of keys in. Non-number keys can be skipped by setting to true.

table.setPrototype
This method returns with its prototype set to. By default is the function that returns the prototype index. This function can be changed to a custom one. See for further information and the parameters passed to it. may also have a parent prototype to index from if both the table and regular prototype indexes are nil, allowing for prototype inheritance chains.

indexFunc Callback
This callback represents the indexing function called whenever a table index on returns nil.
 * Parameters&#58;
 * self: Repersents the table that was indexed.
 * The table index that triggered the function
 * The prototype table passed to the parent function.
 * the parent prototype table passed to the parent function.

table.isSequence
This method returns true if contains only non-negative number keys. Equivalent to JS's.

table.push
This method returns with all items in  appended to the table. must be a sequence (a table where all keys are numbers and are non-negative).

table.
This method returns