overleaf/services/web/app/coffee/managers/GuidManager.coffee

7 lines
181 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
module.exports =
newGuid : ()->
S4 = ()->
return (((1+Math.random())*0x10000)|0).toString(16).substring(1)
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4())