Module:CommonFunctions: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 93: Line 93:
     return contains
     return contains
end
end
    function dump(o)
        if type(o) == 'table' then
            local s = '{ <br>'
            for k, v in pairs(o) do
                if type(k) ~= 'number' then
                    k = '"' .. k .. '"'
                end
                s = s .. '[' .. k .. '] = ' .. dump(v) .. ',<br>'
            end
            return s .. '}'
        else
            return tostring(o)
        end
    end