(minLength = 10, maxLength = 0)
| 63 | export function noop() {} |
| 64 | |
| 65 | export function getRandomString(minLength = 10, maxLength = 0) { |
| 66 | for (let rnd = ''; (rnd += Math.random().toString(36).slice(2));) { |
| 67 | if (rnd.length >= minLength) return maxLength ? rnd.slice(0, maxLength) : rnd; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | export function getUniqId(prefix = 'VM') { |
| 72 | return prefix + getRandomString(); |
no outgoing calls
no test coverage detected