(padding: number = 7)
| 16 | } |
| 17 | |
| 18 | public static unique(padding: number = 7): string { |
| 19 | // Generate a unique ID with padding to have a longer ID |
| 20 | const baseId = ID.#hexTimestamp(); |
| 21 | let randomPadding = ''; |
| 22 | for (let i = 0; i < padding; i++) { |
| 23 | const randomHexDigit = Math.floor(Math.random() * 16).toString(16); |
| 24 | randomPadding += randomHexDigit; |
| 25 | } |
| 26 | return baseId + randomPadding; |
| 27 | } |
| 28 | } |
nothing calls this directly
no test coverage detected