0 points

Standalone UUID generator in Javascript


dashboard

Sat Jun 13 2020 10:41:14 GMT+0000 (UTC)

Posted by @ObiWanMaxim

function uuid() {
  var temp_url = URL.createObjectURL(new Blob());
  var uuid = temp_url.toString();
  URL.revokeObjectURL(temp_url);
  return uuid.substr(uuid.lastIndexOf('/') + 1); // remove prefix (e.g. blob:null/, blob:www.test.com/, ...)
}
content_copy Copy

https://abhishekdutta.org/blog/standalone_uuid_generator_in_javascript.html