[go: up one dir, main page]

This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

essentials-captcha
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Essentials-Captcha

Installation

npm i --save essentials-captcha

Example

const essentials = require('essentials-captcha');

essentials()
.then(captcha => {
    console.log(captcha.url);       // image as url
    console.log(captcha.solution);  // solution as text
})

async function getCaptcha(){
    const captcha = await essentials();
    console.log(captcha.url);
    console.log(captcha.solution);
}

Options

const options = {
    level: 1            // 1 = 'new' generator | 2 = 'old' generator
    style: 'text'       // style of the captcha: 'text' | 'math'
    retry: 0            // times to retry on errors (1 is recommended)
    fetchImage: false   // automatically fetches the image to "Captcha.image"
}
const options = {
    fetchImage: true
}

const captcha = await essentials(options);
console.log(captcha.image);
require('fs').writeFileSync('captcha.png', captcha.image);

Informations

Original Essentials API Repository

API Website

Discord Server

Readme

Keywords

Package Sidebar

Install

npm i essentials-captcha

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

4.2 kB

Total Files

4

Last publish

Collaborators

  • specky