(length: number)
| 1 | export const makeId = (length: number) => { |
| 2 | let text = ''; |
| 3 | const possible = |
| 4 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
| 5 | |
| 6 | for (let i = 0; i < length; i += 1) { |
| 7 | text += possible.charAt(Math.floor(Math.random() * possible.length)); |
| 8 | } |
| 9 | return text; |
| 10 | }; |
no outgoing calls
no test coverage detected