src/string.util.js
function generateUUID() {
    let dat = new Date().getTime();

    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (cha) => {
        const ran = (dat + (Math.random() * 16)) % 16 | 0;
        dat = Math.floor(dat / 16);

        return (cha === 'x' ? ran : ran & 0x3 | 0x8).toString(16);
    });
}
function generateUUID() {
    let dat = new Date().getTime();

    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (cha) => {
        const ran = (dat + (Math.random() * 16)) % 16 | 0;
        dat = Math.floor(dat / 16);

        return (cha === 'x' ? ran : ran & 0x3 | 0x8).toString(16);
    });
}
function generateUUID ( ) { let dat = new Date ( ) . getTime ( ) ; return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' . replace ( / [xy] / g , ( cha ) => { const ran = ( dat + ( Math . random ( ) * 16 ) ) % 16 | 0 ; dat = Math . floor ( dat / 16 ) ; return ( cha === 'x' ? ran : ran & 0x3 | 0x8 ) . toString ( 16 ) ; } ) ; }
Generates a unique 36 character hyphenated GUID
@method utilitarian.string.util#generateUUID
@returns {string} A string GUID
Generates a unique 36 character hyphenated GUID