* Generate a new UUID. * @returns {string}
()
| 65 | * @returns {string} |
| 66 | */ |
| 67 | function token() { |
| 68 | var uuid = [to_hex(rand_int(32), 8), |
| 69 | to_hex(rand_int(16), 4), |
| 70 | to_hex(0x4000 | rand_int(12), 4), |
| 71 | to_hex(0x8000 | rand_int(14), 4), |
| 72 | to_hex(rand_int(48), 12)].join("-") |
| 73 | return uuid; |
| 74 | } |
| 75 | |
| 76 | /** @private */ |
| 77 | function rand_int(bits) { |
no test coverage detected
searching dependent graphs…