Constructor
new Captcha(options)
The constructor of the captcha class
Parameters:
Name | Type | Description |
---|---|---|
options | CaptchaOptions | The options of the captcha |
- Source
Members
jpeg
The JPG stream of the captcha
- Source
options :CaptchaOptions
The options of the captcha
Type:
- Source
The PDF stream of the captcha
- Source
png
The PNG stream of the captcha
- Source
value :String
The value of the captcha
Type:
- String
- Source
Methods
(static) randomText(length) → {String}
Generates a random text
Parameters:
Name | Type | Default | Description |
---|---|---|---|
length | Number | 6 | The length of the text (default: 6) |
- Source
Returns:
- Type:
- String
(static) shuffleArray(arr) → {Array.<Number>}
Shuffles an array with numbers
Parameters:
Name | Type | Description |
---|---|---|
arr | Array. | The array to shuffle |
- Source
Returns:
- Type:
- Array.
<Number>