Jump to content

Module:Taxonbar/whitelist/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tom.Reding (talk | contribs) at 16:25, 14 November 2023 (+Self-doc!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

About

This module returns strict, lax, or all acceptable instance of (P31)s as a Lua table for use in a module such as Module:Taxonbar. For use in documentation, see {{Taxonbar/whitelist}}.

Usage

local myWhitelist = require( 'Module:Taxonbar/whitelist' ).whitelist
Arg Lua Output
strict
local myVariable = myWhitelist{ args = { 'strict' } }
myWhitelist = {
	'Q16521' = 1,
	'Q310890' = 2,
	'Q47487597' = 3,
	'Q2568288' = 4,
	'Q23038290' = 5,
	'Q59278506' = 6,
	'Q98961713' = 7,
	'Q58051350' = 8,
}
lax
local myVariable = myWhitelist{ args = { 'lax' } }
myWhitelist = {
	'Q42621' = 1,
	'Q235536' = 2,
	'Q713623' = 3,
	'Q848328' = 4,
	'Q857968' = 5,
	'Q17487588' = 6,
	'Q124477390' = 7,
}
all
local myVariable = myWhitelist{ args = { 'all' } }
myWhitelist = {
	'Q16521' = 1,
	'Q310890' = 2,
	'Q47487597' = 3,
	'Q2568288' = 4,
	'Q23038290' = 5,
	'Q59278506' = 6,
	'Q98961713' = 7,
	'Q58051350' = 8,
	'Q42621' = 9,
	'Q235536' = 10,
	'Q713623' = 11,
	'Q848328' = 12,
	'Q857968' = 13,
	'Q17487588' = 14,
	'Q124477390' = 15,
}

See also