Module:UŊCDSO: Difference between revisions

From Nguhcraft Wiki
Jump to navigation Jump to search
Created page with "local d = require "Module:Data/UŊCDSO/Countries" local _m = {} _m.number_ung = function(frame) local count = 0 for _,c in ipairs(d.countries) do if c.ung == "MEMBER" then count = count + 1 end end return count end _m.table_sovereign = function(frame) end return _m"
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
local d = require "Module:Data/UŊCDSO/Countries"
local d = mw.loadJsonData "Data:Places"


local _m = {}
local _m = {}
Line 5: Line 5:
_m.number_ung = function(frame)
_m.number_ung = function(frame)
local count = 0
local count = 0
for _,c in ipairs(d.countries) do
for _, c in ipairs(d.places) do
if c.ung == "MEMBER" then count = count + 1 end
if not c.not_ngation and not c.condominium and not c.reason_dissolved and c.ung == "member" then
count = count + 1
end
end
return count
end
 
_m.number_countries = function(frame)
local count = 0
for _, c in ipairs(d.places) do
if not c.not_ngation and not c.condominium and not c.reason_dissolved then
count = count + 1
end
end
end
return count
return count

Latest revision as of 14:05, 24 May 2026

Documentation for this module may be created at Module:UŊCDSO/doc

local d = mw.loadJsonData "Data:Places"

local _m = {}

_m.number_ung = function(frame)
	local count = 0
	for _, c in ipairs(d.places) do
		if not c.not_ngation and not c.condominium and not c.reason_dissolved and c.ung == "member" then
			count = count + 1
		end
	end
	return count
end

_m.number_countries = function(frame)
	local count = 0
	for _, c in ipairs(d.places) do
		if not c.not_ngation and not c.condominium and not c.reason_dissolved then
			count = count + 1
		end
	end
	return count
end

_m.table_sovereign = function(frame) end

return _m