Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank3736 committed Aug 11, 2022
1 parent 3eadb1e commit 0cd9100
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ts-script/extra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,19 @@ export function createCaptcha(width: number, height: number, option: CreateCaptc


captcha.drawCaptcha(option.captcha);
const text = captcha.text;

captcha.drawTrace(option.trace);

captcha.addDecoy({ opacity: 1 });

return { image: captcha.png, text: captcha.text };
};
}
/**
* Create captcha in sync mode.
* @param {number} width captcha image width.
* @param {number} height captcha image height.
* @param {CreateCaptchaOptions} [option] Captcha text.
* @returns
* @returns
*/
export function createCaptchaSync(width: number, height: number, option: CreateCaptchaOptions = {}): captchaValueSync {
const captcha = new Captcha(width, height);
Expand All @@ -63,4 +62,4 @@ export function createCaptchaSync(width: number, height: number, option: CreateC
captcha.addDecoy({ opacity: 1 });

return { image: captcha.png, text: captcha.text };
};
}

0 comments on commit 0cd9100

Please sign in to comment.