parent
161ff62fdc
commit
f229d32442
@ -0,0 +1,9 @@ |
||||
const MAX = 1000000000 |
||||
|
||||
let idCounter = Math.round( Math.random() * MAX ) |
||||
function createRandomId() { |
||||
idCounter = idCounter % MAX |
||||
return idCounter++ |
||||
} |
||||
|
||||
module.exports = createRandomId |
Loading…
Reference in new issue