Guest User

Untitled

a guest
Dec 10th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. export function guid(): string {
  2. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  3. let r = Math.random() * 16 | 0;
  4. let v = c === 'x' ? r : (r & 0x3 | 0x8);
  5. return v.toString(16);
  6. });
  7. }
Add Comment
Please, Sign In to add comment