Module Lib
A utility module, holding miscellaneous functions and structures.
OrderedTable () |
Creates a table that preserves order of key->value pairs as they're entered. |
self:count () |
Returns the number of items in the ordered table. |
self:each () |
Iterates over each item in the table, returning only that item. |
self:ipairs () |
Iterates over each item in the table, returning the index and the item. |
self:opairs () |
Iterates over each item in the table, returning the index, the key, and the item. |
self:pairs () |
Iterates over each item in the table, returning the key and the item. |
-
OrderedTable ()
-
Creates a table that preserves order of key->value pairs as they're entered.
Returns:
table
-
self:count ()
-
Returns the number of items in the ordered table.
-
self:each ()
-
Iterates over each item in the table, returning only that item.
-
self:ipairs ()
-
Iterates over each item in the table, returning the index and the item.
-
self:opairs ()
-
Iterates over each item in the table, returning the index, the key, and the item.
-
self:pairs ()
-
Iterates over each item in the table, returning the key and the item.