Update screenshot resolution.

Fixed prettier issues.
This commit is contained in:
pradyun 2023-04-24 10:30:15 +12:00
parent f2b025c469
commit 20327687ff
2 changed files with 5 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@ -4,7 +4,7 @@ import { randomInt } from "crypto";
export default async function Command() {
const pass = generate();
await Clipboard.copy(pass);
await showHUD("Password copied to clipboard");
}
@ -14,18 +14,18 @@ function generate() {
const lowerVowels = "aeiouy".split("");
const upperVowels = "AEUY".split("");
const numberPositions: {[index: number]: number} = {
const numberPositions: { [index: number]: number } = {
1: 1,
2: 7,
3: 13,
4: 6,
5: 12,
6: 18
6: 18,
};
// choose position of number and upper case letter
const numPosKey = randomInt(2, 7);
const NumberPosition = numberPositions[numPosKey];
const NumberPosition = numberPositions[numPosKey];
let uppercasePos = randomInt(1, 19);
if (uppercasePos === numPosKey) {
@ -50,7 +50,6 @@ function generate() {
}
passwordSection += randomInt(1, 10);
} else {
if (count % 3 === 0) {
// vowel
if (uppercasePos === i) {
@ -72,7 +71,6 @@ function generate() {
if (i % 6 === 0) {
passwordSection += "-";
}
}
return passwordSection;
@ -80,4 +78,4 @@ function generate() {
function randomFromArray(array: any[]) {
return array[randomInt(1, array.length)];
}
}