We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63784e2 commit b17312dCopy full SHA for b17312d
source/utils.ts
@@ -3,9 +3,9 @@ import { PRNG } from "./types.js";
3
4
export function randomChar(prng: PRNG): string {
5
// Currently PRNGs generate fractions from 0 to _less than_ 1, so no "%" is necessary.
6
- // However, just in case a future PRNG can generate 1,
+ // However, just in case a future PRNG can generate 1,
7
// we are applying "% ENCODING LEN" to wrap back to the first character
8
- const randomPosition = Math.floor(prng() * ENCODING_LEN) % ENCODING_LEN;
+ const randomPosition = Math.floor(prng() * ENCODING_LEN) % ENCODING_LEN;
9
return ENCODING.charAt(randomPosition);
10
}
11
0 commit comments