fazlurr
5/30/2016 - 8:04 AM

JavaScript Generate GUID - http://stackoverflow.com/a/105074

JavaScript Generate GUID - http://stackoverflow.com/a/105074

function guid() {
  function s4() {
    return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)
      .substring(1);
  }
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
    s4() + '-' + s4() + s4() + s4();
}