js/canvas2svg.js
function randomString(holder) {
        var chars, randomstring, i;
        if (!holder) {
            throw new Error("cannot create a random attribute name for an undefined object");
        }
        chars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
        randomstring = "";
        do {
            randomstring = "";
            for (i = 0; i < 12; i++) {
                randomstring += chars[Math.floor(Math.random() * chars.length)];
            }
        } while (holder[randomstring]);
        return randomstring;
    }
function randomString(holder) {
        var chars, randomstring, i;
        if (!holder) {
            throw new Error("cannot create a random attribute name for an undefined object");
        }
        chars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
        randomstring = "";
        do {
            randomstring = "";
            for (i = 0; i < 12; i++) {
                randomstring += chars[Math.floor(Math.random() * chars.length)];
            }
        } while (holder[randomstring]);
        return randomstring;
    }
function randomString ( holder ) { var chars , randomstring , i ; if ( ! holder ) { throw new Error ( "cannot create a random attribute name for an undefined object" ) ; } chars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz" ; randomstring = "" ; do { randomstring = "" ; for ( i = 0 ; i < 12 ; i ++ ) { randomstring += chars [ Math . floor ( Math . random ( ) * chars . length ) ] ; } } while ( holder [ randomstring ] ) ; return randomstring ; }
helper function that generates a random string
helper function that generates a random string