1 function guid() { 2 return ‘xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx‘.replace(/[xy]/g, function (c) { 3 var r = Math.random() * 16 | 0, 4 v = c == ‘x‘ ? r : (r & 0x3 | 0x8); 5 return v.toString(16); 6 }); 7 }
2022-07-28 18:16:41
1 function guid() { 2 return ‘xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx‘.replace(/[xy]/g, function (c) { 3 var r = Math.random() * 16 | 0, 4 v = c == ‘x‘ ? r : (r & 0x3 | 0x8); 5 return v.toString(16); 6 }); 7 }