Нет описания правки |
Нет описания правки |
||
| Строка 1: | Строка 1: | ||
return { test = function() | return { test = function() | ||
local ok, result = pcall(function() | local ok, result = pcall(function() | ||
local ok, r = pcall(function() local res = {}; for k,v in pairs( | local ok, r = pcall(function() local ns = mw.site.namespaces[8]; if ns then local res = {}; for k,v in pairs(ns) do res[#res+1] = k .. "=" .. type(v) end; return table.concat(res, ",") end; return "nil" end); return tostring(r) | ||
end) | end) | ||
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end | if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end | ||
end, } | end, } | ||
Версия от 12:23, 22 июня 2026
Для документации этого модуля может быть создана страница Модуль:TableOfChemicals/doc
return { test = function()
local ok, result = pcall(function()
local ok, r = pcall(function() local ns = mw.site.namespaces[8]; if ns then local res = {}; for k,v in pairs(ns) do res[#res+1] = k .. "=" .. type(v) end; return table.concat(res, ",") end; return "nil" end); return tostring(r)
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }