Module:Sandbox/RexxS/Iscountry/doc
| This is a documentation subpage for Module:Sandbox/RexxS/Iscountry. It may contain usage information, categories and other content that is not part of the original module page. |
{{Module rating }} Demo routine to determine whether a Wikidata entity is a country.
It takes an entity-id as the parameter |qid=.
Usage
[edit source]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
Examples
[edit source]For Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q12130)
{{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q12130}}→ Lua error in Module:Sandbox/RexxS/Iscountry at line 59: attempt to index field 'wikibase' (a nil value).
For Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q142)
{{#invoke:Sandbox/RexxS/Iscountry |iscountry |qid=Q142}}→ Lua error in Module:Sandbox/RexxS/Iscountry at line 59: attempt to index field 'wikibase' (a nil value).