function dumptable(t, i)
i = i or 0
for k,v in pairs(t) do
- print(string.rep("\t", i) .. k, v)
+ print(string.rep("\t", i) .. tostring(k), tostring(v))
if type(v) == "table" then
dumptable(v, i+1)
end
end
--- Validates a variable
-function validate(value, cast_number, cast_int)
- if cast_number or cast_int then
- value = tonumber(value)
- end
-
- if cast_int and value and not(value % 1 == 0) then
- value = nil
- end
-
- return value
-end
-
-
-- Parse units from a string and return integer value
function parse_units(ustr)
w = 60 * 60 * 24 * 7,
d = 60 * 60 * 24,
h = 60 * 60,
+ min = 60,
-- storage sizes
kb = 1024,