captcha.js

1.0.5 • Public • Published

captcha.js

This is a Captcha for Node.js Applications.

Example

中文介绍和使用说明

Just write an example of Express, others have time to come up.

1 2 3 4 5 6 7

Requirements

  • ImageMagick 6.9+
  • Ghostscript 8+

Ubuntu

sudo apt-get install imagemagick ghostscript

Mac OS X

brew install imagemagick ghostscript

Usage

Quick Example

const Captcha = require('captcha.js');
const captcha = new Captcha({length: 5});
 
captcha.create((err, result) => {
  if(err) throw err;
  console.log(JSON.stringify(result, null, 2));
});

Optional parameter

new Captcha({
  Length: 4, // number of characters generated
  Font_size: 45, // font size
  Implode: 0.4, // text distortion
  Colorful: true, // whether to colorful
  Line: true, // whether to add dry winding
  Cache_limit: 50, // number of caches
  Cache_dir: '/tmp/' // cache folder
});

Readme

Keywords

Package Sidebar

Install

npm i captcha.js

Weekly Downloads

0

Version

1.0.5

License

ISC

Last publish

Collaborators

  • geniusm4ster