captcha-image
Advanced tools
Comparing version 1.2.4 to 1.2.5
class Captcha { | ||
constructor(font, align, baseline, width, height, bgColor, color) { | ||
constructor(font, align, baseline, width, height, bgColor, color, length) { | ||
this.font = font; | ||
@@ -10,2 +10,3 @@ this.align = align; | ||
this.bgColor = bgColor; | ||
this.length = length; | ||
this.createImage = () => { | ||
@@ -33,3 +34,3 @@ const captcha = document.createElement('canvas'); | ||
let count = 0; | ||
while (count < 6) { | ||
while (count < length) { | ||
newWord += getCharacter(); | ||
@@ -36,0 +37,0 @@ count++; |
{ | ||
"name": "captcha-image", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "A simple captcha image generator.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,2 +27,3 @@ # Captcha Image Generator | ||
| color / String | #222 | | ||
| length / Number / Length of text | 7 | | ||
@@ -55,3 +56,4 @@ ## Events | ||
'#eee', | ||
'#111' | ||
'#111', | ||
6 | ||
).createImage(); | ||
@@ -58,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4412
53
77