Guest User

Untitled

a guest
Oct 16th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. my.uuid4 = function() {
  2. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, my._uuid4);
  3. };
  4. //// OPTIMIZATION - cache callback
  5. my._uuid4 = function(cc) {
  6. var rr = Math.random() * 16 | 0; return (cc === 'x' ? rr : (rr & 0x3 | 0x8)).toString(16);
  7. };
Add Comment
Please, Sign In to add comment