标签:rand tostring xxx uid guid ret fun return style
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 }
标签:rand tostring xxx uid guid ret fun return style
原文地址:https://www.cnblogs.com/LTQ151/p/13720077.html