I need to generate unique id numbers on the fly using javascript. In the past, I\'ve done this by creating a number using time. The number would be made up of the four digi
Using toString(36), slightly slow, here is the faster and unique solution:
toString(36)
new Date().getUTCMilliseconds().toString() + "-" + Date.now() + "-" + filename.replace(/\s+/g, "-").toLowerCase()