Result object for asynchronous CAPTCHA generation containing the image promise and solution text.
const result: CaptchaValue = createCaptcha(300, 100);const buffer = await result.image;fs.writeFileSync('captcha.png', buffer);console.log('Solution:', result.text); Copy
const result: CaptchaValue = createCaptcha(300, 100);const buffer = await result.image;fs.writeFileSync('captcha.png', buffer);console.log('Solution:', result.text);
Promise that resolves to the generated CAPTCHA image as a PNG buffer
The text solution that users must enter to solve the CAPTCHA
Result object for asynchronous CAPTCHA generation containing the image promise and solution text.
Example