diff --git a/docs/CaptchaGenerator.html b/docs/CaptchaGenerator.html index 5dd0562..cdb6e26 100644 --- a/docs/CaptchaGenerator.html +++ b/docs/CaptchaGenerator.html @@ -491,7 +491,12 @@
Returns:
Example
-
const { CaptchaGenerator } = require("captcha-canvas");
const fs = require("fs")
const captcha = new CaptchaGenerator();
const buffer = await captcha.generate() //generate image

fs.writeFileSync("image.png", buffer)
+
const { CaptchaGenerator } = require("captcha-canvas");
+const fs = require("fs")
+const captcha = new CaptchaGenerator();
+const buffer = await captcha.generate() //generate image
+
+fs.writeFileSync("image.png", buffer)
@@ -719,7 +724,14 @@
Properties
Example
-
const { CaptchaGenerator, resolveImage } = require("captcha-canvas");
const fs = require("fs");
const img = await resolveImage("./path/to/file");

const captcha = new CaptchaGenerator()
.generateSync({background: img});

fs.writeFileSync("image.png", captcha);
+
const { CaptchaGenerator, resolveImage } = require("captcha-canvas");
+const fs = require("fs");
+const img = await resolveImage("./path/to/file");
+
+const captcha = new CaptchaGenerator()
+.generateSync({background: img});
+
+fs.writeFileSync("image.png", captcha);
@@ -868,7 +880,13 @@
Parameters:
Example
-
const { CaptchaGenerator } = require("captcha-canvas");
const fs = require("fs")
const captcha = new CaptchaGenerator();
captcha.setBackground("./path/toFile");
const buffer = await captcha.generate() //generate image

fs.writeFileSync("image.png", buffer)
+
const { CaptchaGenerator } = require("captcha-canvas");
+const fs = require("fs")
+const captcha = new CaptchaGenerator();
+captcha.setBackground("./path/toFile");
+const buffer = await captcha.generate() //generate image
+
+fs.writeFileSync("image.png", buffer)
@@ -1017,7 +1035,14 @@
Parameters:
Example
-
const { CaptchaGenerator } = require("captcha-canvas");
const fs = require("fs")
const captcha = new CaptchaGenerator();
const options = {font: "Comic Sans", size: 60}
captcha.setCaptcha(options)
const buffer = await captcha.generate() //generate image

fs.writeFileSync("image.png", buffer)
+
const { CaptchaGenerator } = require("captcha-canvas");
+const fs = require("fs")
+const captcha = new CaptchaGenerator();
+const options = {font: "Comic Sans", size: 60}
+captcha.setCaptcha(options)
+const buffer = await captcha.generate() //generate image
+
+fs.writeFileSync("image.png", buffer)
@@ -1333,7 +1358,13 @@
Parameters:
Example
-
const { CaptchaGenerator } = require("captcha-canvas");
const fs = require("fs")
const captcha = new CaptchaGenerator();
captcha.setDimension(200, 600);
const buffer = await captcha.generate() //generate image

fs.writeFileSync("image.png", buffer)
+
const { CaptchaGenerator } = require("captcha-canvas");
+const fs = require("fs")
+const captcha = new CaptchaGenerator();
+captcha.setDimension(200, 600);
+const buffer = await captcha.generate() //generate image
+
+fs.writeFileSync("image.png", buffer)
@@ -1482,7 +1513,14 @@
Parameters:
Example
-
const { CaptchaGenerator } = require("captcha-canvas");
const fs = require("fs")
const captcha = new CaptchaGenerator();
const options = {size: 5, color: "deeppink"}
captcha.setTrace(options)
const buffer = await captcha.generate() //generate image

fs.writeFileSync("image.png", buffer)
+
const { CaptchaGenerator } = require("captcha-canvas");
+const fs = require("fs")
+const captcha = new CaptchaGenerator();
+const options = {size: 5, color: "deeppink"}
+captcha.setTrace(options)
+const buffer = await captcha.generate() //generate image
+
+fs.writeFileSync("image.png", buffer)
@@ -1506,7 +1544,7 @@
Example

diff --git a/docs/constants.js.html b/docs/constants.js.html index a5969a3..c81c1c2 100644 --- a/docs/constants.js.html +++ b/docs/constants.js.html @@ -135,7 +135,7 @@

Source: constants.js


diff --git a/docs/global.html b/docs/global.html index da8753f..8eb38ae 100644 --- a/docs/global.html +++ b/docs/global.html @@ -1557,7 +1557,7 @@
Properties:

diff --git a/docs/index.html b/docs/index.html index cfe5391..00a36f0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -119,7 +119,7 @@

Support


diff --git a/docs/main.js.html b/docs/main.js.html index 610266f..533c441 100644 --- a/docs/main.js.html +++ b/docs/main.js.html @@ -47,7 +47,7 @@

Source: main.js

const { randomBytes } = require('crypto');
-const merge = require("deepmerge");
+const { merge } = require("./util");
 const { 
     defaultCaptchaOptions, 
     defaultTraceOptions, 
@@ -401,7 +401,7 @@ 

Source: main.js


- Documentation generated by JSDoc 3.6.6 on Sat Apr 24 2021 10:22:22 GMT+0530 (India Standard Time) using Skyceil Theme + Documentation generated by JSDoc 3.6.6 on Sat Apr 24 2021 06:38:13 GMT+0000 (Coordinated Universal Time) using Skyceil Theme
diff --git a/docs/util.js.html b/docs/util.js.html new file mode 100644 index 0000000..436d696 --- /dev/null +++ b/docs/util.js.html @@ -0,0 +1,81 @@ + + + + + Source: util.js + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +

Source: util.js

+ + + + + + +
+
+
module.exports = {
+    /**
+     * Merge two objects
+     * @param {object} oldObject 
+     * @param {object} newObject 
+     */
+    merge: function(oldObject, newObject) {
+        for (const prop in newObject) {
+            oldObject[prop] = newObject[prop];
+        } 
+        return oldObject;
+    }
+}
+
+
+ + + + + +
+ +
+ +
+ Documentation generated by JSDoc 3.6.6 on Sat Apr 24 2021 06:38:13 GMT+0000 (Coordinated Universal Time) using Skyceil Theme +
+ + + + + +