1.0.5 • Published 6 years ago

captcha.js v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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
});
1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.0

8 years ago