Needed to generate a unique ID for API requests for NutShell CRM. (In Google Apps Script).
Found this nice one on the interwebs...
Works quite well in Google Apps Script... Not a real GUID "guids need hardware access to be truly random, but good enough for my request ids.)
Found this nice one on the interwebs...
function guidGenerator() {
var S4 = function() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
};
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}
Works quite well in Google Apps Script... Not a real GUID "guids need hardware access to be truly random, but good enough for my request ids.)
Comments
Post a Comment