captcha-plus

2.5.2 • Public • Published

npm install captcha-plus

Usages

const captcha = require("captcha-plus");
const fs = require("fs");

captcha.create("id"); 
//Create User Code [This has no time]


captcha.user("id");
/* Give
{
  user: "id",
  code: "user code"
}
*/

captcha.convert(captcha.user("id").code);
/* Give
{
  buffer: <buffer...,
  base64: 'data:image/png;base64....'
}
*/

const code = captcha.convert(captcha.user("id").code).buffer; 
//Give You Buffer (Recommended)


fs.writeFileSync("captcha.png", code); 
//Converts Buffer to Image (Saved Image)


captcha.convert(captcha.user("id").code).base64; 
//Gives You Base64


captcha.check("id", code); 
//If true, returns "true" else returns "false". [Type: boolean]

Changelog

  • 2.5.2
+ Fixed Bugs
  • 2.5.1
+ Auto Create Database File
  • 2.5.0
- image Deleted
+ base64 Added
  • 2.0.0
+ Fixed Bugs
  • 0.0.1
+ First Release

/captcha-plus/

    Package Sidebar

    Install

    npm i captcha-plus

    Weekly Downloads

    4

    Version

    2.5.2

    License

    MIT

    Unpacked Size

    1.6 MB

    Total Files

    43

    Last publish

    Collaborators

    • nonamejs
    • tahakocabuga