<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FRexxS%2FIscountry</id>
	<title>Module:Sandbox/RexxS/Iscountry - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FRexxS%2FIscountry"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RexxS/Iscountry&amp;action=history"/>
	<updated>2026-05-10T05:45:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/RexxS/Iscountry&amp;diff=146089&amp;oldid=prev</id>
		<title>imported&gt;Headbomb: /* top */clean up, replaced: â€“ → –</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RexxS/Iscountry&amp;diff=146089&amp;oldid=prev"/>
		<updated>2021-05-24T14:20:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top: &lt;/span&gt;clean up, replaced: â€“ → –&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[ https://w.wiki/aXJ&lt;br /&gt;
SELECT ?item ?itemLabel WHERE {&lt;br /&gt;
  ?item wdt:P279 wd:Q6256.&lt;br /&gt;
  SERVICE wikibase:label { bd:serviceParam wikibase:language &amp;quot;[AUTO_LANGUAGE],en&amp;quot;. }&lt;br /&gt;
}&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local types_of_country = {&lt;br /&gt;
	&amp;quot;Q6256&amp;quot;,	-- country&lt;br /&gt;
	&amp;quot;Q112099&amp;quot;,	-- island nation&lt;br /&gt;
	&amp;quot;Q123480&amp;quot;,	-- landlocked country&lt;br /&gt;
	&amp;quot;Q132453&amp;quot;,	-- developed country&lt;br /&gt;
	&amp;quot;Q160381&amp;quot;,	-- Western world&lt;br /&gt;
	&amp;quot;Q177323&amp;quot;,	-- developing country&lt;br /&gt;
	&amp;quot;Q188800&amp;quot;,	-- personal union&lt;br /&gt;
	&amp;quot;Q331644&amp;quot;,	-- Khanate&lt;br /&gt;
	&amp;quot;Q831048&amp;quot;,	-- Nassau-Hadamar&lt;br /&gt;
	&amp;quot;Q899706&amp;quot;,	-- Peru–Bolivian Confederation&lt;br /&gt;
	&amp;quot;Q1093720&amp;quot;,	-- real union&lt;br /&gt;
	&amp;quot;Q1151616&amp;quot;,	-- stateless nation&lt;br /&gt;
	&amp;quot;Q1323642&amp;quot;,	-- transcontinental country&lt;br /&gt;
	&amp;quot;Q1501897&amp;quot;,	-- Generality Lands&lt;br /&gt;
	&amp;quot;Q1538989&amp;quot;,	-- megadiverse country&lt;br /&gt;
	&amp;quot;Q1541668&amp;quot;,	-- County of Diez&lt;br /&gt;
	&amp;quot;Q1641089&amp;quot;,	-- Multinational state&lt;br /&gt;
	&amp;quot;Q2281140&amp;quot;,	-- safe country of origin&lt;br /&gt;
	&amp;quot;Q2639564&amp;quot;,	-- low-wage country&lt;br /&gt;
	&amp;quot;Q3024240&amp;quot;,	-- historical country&lt;br /&gt;
	&amp;quot;Q3373662&amp;quot;,	-- French-speaking Country&lt;br /&gt;
	&amp;quot;Q3500085&amp;quot;,	-- periphery countries&lt;br /&gt;
	&amp;quot;Q3624078&amp;quot;,	-- sovereign state&lt;br /&gt;
	&amp;quot;Q5170193&amp;quot;,	-- core countries&lt;br /&gt;
	&amp;quot;Q5367717&amp;quot;,	-- shinkoku&lt;br /&gt;
	&amp;quot;Q6726158&amp;quot;,	-- Independent country&lt;br /&gt;
	&amp;quot;Q7449317&amp;quot;,	-- semi-periphery countries&lt;br /&gt;
	&amp;quot;Q11396118&amp;quot;,	-- divided country&lt;br /&gt;
	&amp;quot;Q11495981&amp;quot;,	-- victorious country&lt;br /&gt;
	&amp;quot;Q25449457&amp;quot;,	-- continental country&lt;br /&gt;
	&amp;quot;Q28864179&amp;quot;,	-- proposed country&lt;br /&gt;
	&amp;quot;Q51576574&amp;quot;,	-- Mediterranean country&lt;br /&gt;
	&amp;quot;Q66724388&amp;quot;,	-- autonomous country within the Kingdom of Denmark&lt;br /&gt;
	&amp;quot;Q66903706&amp;quot;,	-- banana producing countries&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local isCountry = {}&lt;br /&gt;
for i, v in ipairs(types_of_country) do&lt;br /&gt;
	isCountry[v] = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- _iscountry takes Q-id and returns true if it&amp;#039;s a country.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies:&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
p._iscountry = function(qid)&lt;br /&gt;
	local inst = mw.wikibase.getBestStatements(qid, &amp;quot;P31&amp;quot;)&lt;br /&gt;
	if #inst &amp;gt; 0 then&lt;br /&gt;
		for i, v in ipairs(inst) do&lt;br /&gt;
			local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id&lt;br /&gt;
			if isCountry[instid] then return true end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.iscountry = function(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	if not args.qid then args = frame:getParent().args end&lt;br /&gt;
	return p._iscountry(args.qid) or &amp;quot;&amp;quot; -- return empty string not &amp;quot;false&amp;quot; to invoke&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Headbomb</name></author>
	</entry>
</feed>