JavaScript Random Number Generator

Here’s an easy to use random number generator function in javascript.

function random(min, max) {
  if(!max) { 
    return Math.floor(Math.random() * min);
  }
  return Math.floor(Math.random() * (max - min + 1)) + min;
}

I wonder if I can push this to Bower.