Module:Sandbox/RexxS/Iscountry/doc

< Module:Sandbox‎ | RexxS‎ | Iscountry
Revision as of 22:07, 27 August 2020 by imported>RexxS (→‎Usage: examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Sandbox/RexxS/Iscountry

{{Module rating }} Demo routine to determine whether a Wikidata entity is a country.

It takes an entity-id as the parameter |qid=.

UsageEdit

From wiki-text:

  • {{#invoke:Sandbox/RexxS/Iscountry|iscountry |qid=entity-id}}

From another module:

local iscountry = require("Module:Sandbox/RexxS/Iscountry)._iscountry"
if iscountry(qid) then
    ...
end

ExamplesEdit

For (Q12130)

  • {{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q12130}}

For (Q142)

  • {{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q142}} → true