Module:UtilsAnimalTables/doc: Difference between revisions

From Eco - English Wiki
[unchecked revision][checked revision]
m (Demian moved page Module:UtilsAnimalLists/doc to Module:UtilsAnimalTables/doc: Consistent naming: list to table.)
m (→‎Usage: Consistent naming: list to table.)
Line 3: Line 3:
Add the following line of code at the top of your file.
Add the following line of code at the top of your file.


<syntaxhighlight lang="lua">local AnimalUtils = require("Module:UtilsAnimalLists")
<syntaxhighlight lang="lua">local AnimalUtils = require("Module:UtilsAnimalTables")


-- You may then call functions from this module in your script. For example:
-- You may then call functions from this module in your script. For example:
local rangeText = AnimalUtils.toCountRange(2, 5, true)</syntaxhighlight>
local rangeText = AnimalUtils.toCountRange(2, 5, true)</syntaxhighlight>
[[Category: WikiModules]]
[[Category: WikiModules]]

Revision as of 01:04, 26 February 2022

Various utility functions to use when building tables of animals from Module:AnimalData. Primarily intended for use in Module:List Animals and Module:List Fish.

Usage

Add the following line of code at the top of your file.

local AnimalUtils = require("Module:UtilsAnimalTables")

-- You may then call functions from this module in your script. For example:
local rangeText = AnimalUtils.toCountRange(2, 5, true)