()
| 1 | let _existingIds = []; |
| 2 | const MAX_ID = 10000000; |
| 3 | export function generateId() { |
| 4 | let id; |
| 5 | do { |
| 6 | id = Math.floor(Math.random() * MAX_ID); |
| 7 | } while (_existingIds.indexOf(id) !== -1); |
| 8 | |
| 9 | _existingIds.push(id); |
| 10 | return id; |
| 11 | } |
| 12 | |
| 13 | export function generateSha() { |
| 14 | let sha = ''; |
no outgoing calls
no test coverage detected