Модуль:Песочница/Pok/2
Для документации этого модуля может быть создана страница Модуль:Песочница/Pok/2/doc
local p = {}
local data = mw.loadData('Module:Песочница/Pok/3')
local function key()
local t = mw.title.getCurrentTitle()
return t and t.prefixedText or nil
end
function p.set(frame)
local args = frame.args or {}
local v = args.path or args[1] or args.base or ""
v = mw.text.trim(tostring(v or ""))
local k = key()
if k and v ~= "" then
data[k] = v
end
return ""
end
function p.get()
local k = key()
if not k then return nil end
return data[k]
end
return p