mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 11:01:41 +01:00
b6ccd22d6c
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
9 lines
213 B
JavaScript
9 lines
213 B
JavaScript
const MAX = Number.MAX_SAFE_INTEGER
|
|
|
|
let idCounter = Math.round(Math.random() * MAX)
|
|
export default function createRandomId () {
|
|
idCounter %= MAX
|
|
// eslint-disable-next-line no-plusplus
|
|
return idCounter++
|
|
}
|