Module:Table

local p = {}

-- Do mw.text.trim to all values in a table function p.trimAll( f, toRemove, keepEmptyParams ) local g = {} for i, j in pairs( f ) do		if type( j ) == 'string' then g[i] = mw.text.trim( j ) ~=  and ( toRemove and mw.text.trim( j, toRemove ) or mw.text.trim( j ) ) or keepEmptyParams and  else g[i] = j		end end return g end

-- Do string.gsub to all indexes in a table function p.igsub( f, pattern, repl ) local g = {} for i, j in pairs( f ) do		g[string.gsub( i, pattern, repl )] = j	end return g end

return p