mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 16:26:15 -04:00
chore(deps): switched to fucking typescript v5 (#501)
* chore(deps): update dependency typescript to v5 * chore(deps): switched to fucking typescript v5 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
parent
6ff9a01cc8
commit
76b2761d62
10 changed files with 1121 additions and 886 deletions
|
@ -15,14 +15,12 @@ export function createToken({
|
|||
length?: number
|
||||
alphabet?: string
|
||||
}) {
|
||||
const allAlphabet
|
||||
= alphabet
|
||||
?? [
|
||||
...(withUppercase ? 'ABCDEFGHIJKLMOPQRSTUVWXYZ' : ''),
|
||||
...(withLowercase ? 'abcdefghijklmopqrstuvwxyz' : ''),
|
||||
...(withNumbers ? '0123456789' : ''),
|
||||
...(withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : ''),
|
||||
].join('');
|
||||
const allAlphabet = alphabet ?? [
|
||||
withUppercase ? 'ABCDEFGHIJKLMOPQRSTUVWXYZ' : '',
|
||||
withLowercase ? 'abcdefghijklmopqrstuvwxyz' : '',
|
||||
withNumbers ? '0123456789' : '',
|
||||
withSymbols ? '.,;:!?./-"\'#{([-|\\@)]=}*+' : '',
|
||||
].join(''); ;
|
||||
|
||||
return shuffleString(allAlphabet.repeat(length)).substring(0, length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue