Uuid Javascript

Source URL: N/A

Language: typescript

Created on: 2021-01-07 09:34:17

  uuidv4() {
    return 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
      var r = (Math.random() * 16) | 0,
        v = c == 'x' ? r : (r & 0x3) | 0x8;
      return v.toString(16);
    });
  }
Uuid Javascript
content_copy