/** * Exports a random GUID. This function is fast but not secure. Use * when you don't fear attacks but just want to avoid collisions * internally. * * @return {[type]} [description] */ export function guid(): string { const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4(); }