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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.5.24latest

Version History

VersionDownloads (Last 7 Days)Published
2.5.24
2.5.10
2.5.00
2.0.00
0.0.10

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