fix parameter of length to type "number" (#492)
This commit is contained in:
parent
6500db9c1c
commit
25958a9548
|
@ -29,7 +29,7 @@ export const programmingLanguages: languageMap = {
|
||||||
// add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component
|
// add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateRandomString = (length: Number, lowercase = false) => {
|
export const generateRandomString = (length: number, lowercase = false) => {
|
||||||
const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789'; // excluding similar looking characters like Z, 2, I, 1, O, 0
|
const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789'; // excluding similar looking characters like Z, 2, I, 1, O, 0
|
||||||
let result = '';
|
let result = '';
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue