Module:Repeat

local utils = {}

function utils.big(frame) local elm = frame.args[1] or frame:getParent.args[1] local arg2 = frame.args[2] or frame:getParent.args[2] local x = tonumber(arg2) for i=1,x do        elm = " " .. elm .. " "   end return elm end

function utils.same(frame) local elm = frame.args[1] or frame:getParent.args[1] local arg2 = frame.args[2] or frame:getParent.args[2] local x = tonumber(arg2) local elm2 = elm for i=2,x do        elm2 = elm2 .. elm end return elm2 end

function utils.gradient(frame) local count1 = 1 local count2 = 1 local tab1 = frame.args[1] local tab2 = frame:getParent.args[1] local arglist local argcount local range while tab1 ~= nil do       tab1 = frame.args[count1] count1 = count1 + 1 end while tab2 ~= nil do       tab2 = frame:getParent.args[count2] count2 = count2 + 1 end if count1 >= count2 then arglist = frame.args argcount = count1 - 2 else arglist = frame:getParent.args argcount = count2 - 2 end range = arglist[1] .. ", "   for i=1,(argcount-1) do        local x = string.format("%.1f",100 * (i/argcount)).. "% "       range = range .. arglist[i] .. " ".. x .. ", "       range = range .. arglist[i + 1] .. " " .. x .. ", "   end range = range .. arglist[argcount] .. " 100%"   return "linear-gradient(to right, ".. range ..") no-repeat" end

return utils