mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
merge 036, everything broken
This commit is contained in:
11
sdk/lib/util/getRandomString.ts
Normal file
11
sdk/lib/util/getRandomString.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user