模块:Deep4 ExtFuncFull

来自希服维基

可在模块:Deep4 ExtFuncFull/doc创建此模块的帮助文档

local p = {}
function p.test()
    local results = {}

    if mw.ext then
        for ext_name, ext_obj in pairs(mw.ext) do
            local func_list = {}
            for func_name, func_val in pairs(ext_obj) do
                func_list[#func_list+1] = func_name .. "=" .. type(func_val)
            end
            results[#results+1] = ext_name .. ": " .. table.concat(func_list, ", ")
        end
    end

    -- Also check for mw.experimental or other hidden APIs
    local hidden = {"experimental", "hooks", "data", "debug", "profiler", "benchmark"}
    for _, h in ipairs(hidden) do
        local val = mw[h]
        if val ~= nil then
            results[#results+1] = h .. "=" .. type(val)
        end
    end

    return table.concat(results, " | ")
end
return p