- let nbRands = Math.ceil(tlen/10); //10 = min length of a rand() string
- for (let i = 0; i < nbRands; i++)
- res += randString();
- return res.substr(0, tlen);
-}
+ // 10 = min length of a rand() string
+ const nbRands = Math.ceil(tokenLength/10);
+ for (let i = 0; i < nbRands; i++) res += randString();
+ return res.substr(0, tokenLength);
+};