This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I cannot claim this - it was recommended by a friend as a 'good enough' unique id generator | |
for local client side scenarios in the browser. The use case I'm looking to address has to | |
do with cross-frame messaging, where each point of origin needs a unique id (to be used as an | |
"origin" or correlation identifier). Therefore - the IDs do not need to be unique on a large | |
scale (e.g. - across a vast network of connected clients), but only in the browser, locally, | |
for the life of the session. Question is: is this good enough? | |
*/ | |
function createUUID() { | |
var s = []; |