Module:UŊCDSO: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local d = | 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. | for _, c in ipairs(d.places) do | ||
if c.ung == " | if not c.not_ngation and not c.condominium and not c.reason_dissolved and c.ung == "member" then | ||
count = count + 1 | |||
end | |||
end | end | ||
return count | return count | ||
| Line 13: | Line 15: | ||
_m.number_countries = function(frame) | _m.number_countries = function(frame) | ||
local count = 0 | local count = 0 | ||
for _,c in ipairs(d. | for _, c in ipairs(d.places) do | ||
if not c.not_ngation and not c. | if not c.not_ngation and not c.condominium and not c.reason_dissolved then | ||
count = count + 1 | count = count + 1 | ||
end | end | ||
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