mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 18:31:54 +00:00
12 lines
304 B
TypeScript
12 lines
304 B
TypeScript
import { RandomString } from "../config/configTypes"
|
|
import { getRandomCharInSet } from "./getRandomCharInSet"
|
|
|
|
export function getRandomString(generator: RandomString): string {
|
|
let s = ""
|
|
for (let i = 0; i < generator.len; i++) {
|
|
s = s + getRandomCharInSet(generator.charset)
|
|
}
|
|
|
|
return s
|
|
}
|