Uniqueid should be a 64-bit hex number, not a UUID

This commit is contained in:
Cameron Gutman
2016-03-10 22:07:04 -08:00
parent baa3a1a68c
commit 8ce558f701
2 changed files with 17 additions and 10 deletions

View File

@@ -5,6 +5,13 @@ function guuid() {
});
}
function uniqueid() {
return 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function(c) {
var r = Math.random()*16|0;
return r.toString(16);
});
}
String.prototype.toHex = function() {
var hex = '';
for(var i = 0; i < this.length; i++) {