five
five copied to clipboard
Consider adding five.times()
It would be really handy to have a five.times() function that does the following:
- If a number
xis passed to it, calculatefive() * x - If a function
fis passed to it, execute it five times
five.times = function(entity){
if(typeof entity === "number")
return five() * entity;
if(typeof entity === "string")
return entity.repeat(five());
if(typeof entity === "function")
for(let i = five() - five();
i < five();
i += five() / five())
entity(i);
// because you can't have enough five.
return five();
}