diff --git a/random.js b/random.js index ed8e2c4..1df672f 100644 --- a/random.js +++ b/random.js @@ -29,6 +29,10 @@ export const oneOf = arr => arr[math.floor(rand() * arr.length)] // @ts-ignore const uuidv4Template = [1e7] + -1e3 + -4e3 + -8e3 + -1e11 + +/** + * @return {string} + */ export const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c => (c ^ uint32() & 15 >> c / 4).toString(16) )