Captcha

The captcha class

Constructor

new Captcha(options)

The constructor of the captcha class

Parameters:
NameTypeDescription
optionsCaptchaOptions

The options of the captcha

Members

jpeg

The JPG stream of the captcha

options :CaptchaOptions

The options of the captcha

pdf

The PDF stream of the captcha

png

The PNG stream of the captcha

value :String

The value of the captcha

Type:
  • String

Methods

(static) randomText(length) → {String}

Generates a random text

Parameters:
NameTypeDefaultDescription
lengthNumber6

The length of the text (default: 6)

Returns:
Type: 
String

(static) shuffleArray(arr) → {Array.<Number>}

Shuffles an array with numbers

Parameters:
NameTypeDescription
arrArray.<Number>

The array to shuffle

Returns:
Type: 
Array.<Number>