mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46: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
|
@ -18,7 +18,7 @@ function computeVariance({ data }: { data: number[] }) {
|
|||
return computeAverage({ data: squaredDiffs });
|
||||
}
|
||||
|
||||
function arrayToMarkdownTable({ data, headerMap = {} }: { data: unknown[]; headerMap?: Record<string, string> }) {
|
||||
function arrayToMarkdownTable({ data, headerMap = {} }: { data: Record<string, unknown>[]; headerMap?: Record<string, string> }) {
|
||||
if (!Array.isArray(data) || data.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -5,4 +5,4 @@ export type EmojiInfo = {
|
|||
emoji: string
|
||||
codePoints: string | undefined
|
||||
unicode: string
|
||||
} & typeof emojiUnicodeData['\uD83E\uDD10'];
|
||||
} & typeof emojiUnicodeData[string];
|
||||
|
|
|
@ -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