captcha-canvas API Documentation - v3.3.4
    Preparing search index...

    Interface CaptchaValue

    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);
    interface CaptchaValue {
        image: Promise<Buffer>;
        text: string;
    }
    Index

    Properties

    Properties

    image: Promise<Buffer>

    Promise that resolves to the generated CAPTCHA image as a PNG buffer

    text: string

    The text solution that users must enter to solve the CAPTCHA