{"_id":"@bestdon/nodejs-captcha","_rev":"3-086748943d107f7f1ef94b2ba61b97ab","name":"@bestdon/nodejs-captcha","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@bestdon/nodejs-captcha","description":"Create captcha in nodejs","main":"index.js","version":"1.0.0","license":"MIT","scripts":{"npm-pubish":"npm publish","server-test":"node server.js","start":"node server.js","test":"mocha --reporter spec"},"dependencies":{"canvas":"^2.7.0"},"devDependencies":{"chai":"^4.3.4","mocha":"^8.3.2"},"author":{"name":"Harry Naruto"},"repository":{"type":"git","url":"git+https://github.com/Bestdon0610/nodejs-captcha/issues"},"bugs":{"url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"bundleDependencies":[],"deprecated":false,"engines":{"node":">=6"},"keywords":["nodejs","captcha"],"publishConfig":{"access":"public"},"_id":"@bestdon/nodejs-captcha@1.0.0","gitHead":"f94ecf9dbea96f3fc37bc23e936e1871f811d976","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-R3MbxH6WtZYRLtIL+YSfwLGYRPcOfRQTuuz6XLUb8janaHpV7Hsh4jNcx18Qlhg4akW7OnW1crJhN8tevu+Skw==","shasum":"5af1129f9fe1df2937490217ee3c97712536b46a","tarball":"https://registry.npmjs.org/@bestdon/nodejs-captcha/-/nodejs-captcha-1.0.0.tgz","fileCount":7,"unpackedSize":11530,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxUk48PGvxwJr43pVCxXoVp8kRh3w0utd1/bYVPHHqbgIhALE2pr0HALzay+r9GdavJ3PlZwqX3d01fGWqH/S92Hs6"}]},"_npmUser":{"name":"hwolf0610","email":"hwolf0610@gmail.com"},"directories":{},"maintainers":[{"name":"hwolf0610","email":"hwolf0610@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodejs-captcha_1.0.0_1701069145618_0.03185444534475801"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bestdon/nodejs-captcha","description":"Create captcha in nodejs","main":"index.js","version":"1.0.1","license":"MIT","scripts":{"npm-pubish":"npm publish","server-test":"node server.js","start":"node server.js","test":"mocha --reporter spec"},"dependencies":{"canvas":"^2.7.0"},"devDependencies":{"chai":"^4.3.4","mocha":"^8.3.2"},"author":{"name":"Harry Naruto"},"repository":{"type":"git","url":"git+https://github.com/Bestdon0610/nodejs-captcha/issues"},"bugs":{"url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"bundleDependencies":[],"deprecated":false,"engines":{"node":">=6"},"keywords":["nodejs","captcha"],"publishConfig":{"access":"public"},"_id":"@bestdon/nodejs-captcha@1.0.1","gitHead":"2c29f101d00c33c68010756e2892009d475af6cc","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-4/0iaqAPVpnKh6bRfwdVNMXc/zqqeXqkJ61SPRcEr7siLElj1y+4xVcWizScYxtn5XG4WAfsuPijH/5pBNEtBw==","shasum":"41cd3d4743bf587e661cdfc68979ef66627ec11a","tarball":"https://registry.npmjs.org/@bestdon/nodejs-captcha/-/nodejs-captcha-1.0.1.tgz","fileCount":7,"unpackedSize":11566,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKZzcHSHhzk3gPknNZrrwbBjc5r/bP2is6doGdm/FAgQIgH8ayHwmCI3yCQGAjeVfIAAbPHUX4uL15s1MXtYu6r00="}]},"_npmUser":{"name":"hwolf0610","email":"hwolf0610@gmail.com"},"directories":{},"maintainers":[{"name":"hwolf0610","email":"hwolf0610@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodejs-captcha_1.0.1_1701069414029_0.4326317398962747"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bestdon/nodejs-captcha","description":"Create captcha in nodejs","main":"index.js","version":"1.0.2","license":"MIT","scripts":{"npm-pubish":"npm publish","server-test":"node server.js","start":"node server.js","test":"mocha --reporter spec"},"dependencies":{"canvas":"^2.7.0"},"devDependencies":{"chai":"^4.3.4","mocha":"^8.3.2"},"author":{"name":"Harry Naruto"},"repository":{"type":"git","url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"bugs":{"url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"bundleDependencies":[],"deprecated":false,"engines":{"node":">=6"},"keywords":["nodejs","captcha"],"publishConfig":{"access":"public"},"_id":"@bestdon/nodejs-captcha@1.0.2","gitHead":"45645d4b57e9c7db1019c8bfbd67969880647f0a","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-qLkdEQiKMltq3SN6t2QJL4M8imEgSzPy1xJHjnASfI5u/8XjOg/eDB7pepAzRoXY4kJHs/sNyLAP9SXsuA2AVg==","shasum":"b48b8d800e5c4c0127aa8f1f28c9cde6a11b1415","tarball":"https://registry.npmjs.org/@bestdon/nodejs-captcha/-/nodejs-captcha-1.0.2.tgz","fileCount":7,"unpackedSize":11562,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYsBrcZT55kGxivobTr0m5XgLoWsXNExIjBBQCXjJ2zAiEAshUgZ4E1l298rn+yCqiwgk9jHRCHhFg00PML0KlsssA="}]},"_npmUser":{"name":"hwolf0610","email":"hwolf0610@gmail.com"},"directories":{},"maintainers":[{"name":"hwolf0610","email":"hwolf0610@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodejs-captcha_1.0.2_1701069610025_0.5492715881429882"},"_hasShrinkwrap":false},"1.0.3":{"name":"@bestdon/nodejs-captcha","description":"Create captcha in nodejs","main":"index.js","version":"1.0.3","license":"MIT","scripts":{"npm-pubish":"npm publish","server-test":"node server.js","start":"node server.js","test":"mocha --reporter spec"},"dependencies":{"canvas":"^2.7.0"},"devDependencies":{"chai":"^4.3.4","mocha":"^8.3.2"},"author":{"name":"Harry Naruto"},"repository":{"type":"git","url":"git+https://github.com/Bestdon0610/nodejs-captcha.git"},"bugs":{"url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"bundleDependencies":[],"deprecated":false,"engines":{"node":">=6"},"keywords":["nodejs","captcha"],"publishConfig":{"access":"public"},"_id":"@bestdon/nodejs-captcha@1.0.3","gitHead":"66c148a270f67f6b572318c37157bf8c4ee09b11","homepage":"https://github.com/Bestdon0610/nodejs-captcha#readme","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-EAto+1oUwc1zdTi9nIuSuBmHq004+i2Cv3j7eEPSioalJ+himmAwEe5oPR994gc4TZdszsmp/ElHBokwSnqboA==","shasum":"a84079f688a36d57990167406810e2c3fe77d38a","tarball":"https://registry.npmjs.org/@bestdon/nodejs-captcha/-/nodejs-captcha-1.0.3.tgz","fileCount":7,"unpackedSize":11555,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1lCOw6zybKNNle7vNIteWYmrAGjWxXEs/hZZtxMXNbAiEArBEytlB45n2CxitJL1AKdbipOQBIISR+IE00Us7uqMw="}]},"_npmUser":{"name":"hwolf0610","email":"hwolf0610@gmail.com"},"directories":{},"maintainers":[{"name":"hwolf0610","email":"hwolf0610@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodejs-captcha_1.0.3_1701069697408_0.7731373721211905"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-27T07:12:25.502Z","1.0.0":"2023-11-27T07:12:25.845Z","modified":"2023-11-27T07:21:37.840Z","1.0.1":"2023-11-27T07:16:54.176Z","1.0.2":"2023-11-27T07:20:10.208Z","1.0.3":"2023-11-27T07:21:37.638Z"},"maintainers":[{"name":"hwolf0610","email":"hwolf0610@gmail.com"}],"description":"Create captcha in nodejs","keywords":["nodejs","captcha"],"repository":{"type":"git","url":"git+https://github.com/Bestdon0610/nodejs-captcha.git"},"author":{"name":"Harry Naruto"},"bugs":{"url":"https://github.com/Bestdon0610/nodejs-captcha/issues"},"license":"MIT","readme":"# nodejs-captcha\n\nCreates Captcha in base64 format\n\n# installation\n\n`npm i @bestdon/nodejs-captcha`\n\n# usage\n\n```javascript\n// import library\nvar captcha = require(\"@bestdon/nodejs-captcha\");\n\n// Create new Captcha\nvar newCaptcha = captcha();\n\n// Value of the captcha\nvar value = newCaptcha.value;\n\n// Image in base64\nvar imagebase64 = newCaptcha.image;\n\n// Width of the image\nvar width = newCaptcha.width;\n\n// Height of the image\nvar height = newCaptcha.heigth;\n```\n\n### sample usage with nodejs http\n\n```javascript\n\"use strict\";\nvar http = require(\"http\");\nvar captcha = require(\"@bestdon/nodejs-captcha\");\nvar PORT = 8181;\n\nfunction handleRequest(req, res) {\n  if (\n    req.method === \"GET\" &&\n    (req.url === \"/\" || req.url.indexOf(\"index\") > -1)\n  ) {\n    let result = captcha();\n    let source = result.image;\n    res.end(\n      `\n    <!doctype html>\n    <html>\n        <head>\n            <title>Test Captcha</title>\n        </head>\n        <body>\n        <label>Test image</label>\n        <img src=\"${source}\" />\n        </body>\n    </html>\n    `\n    );\n  } else {\n    res.end(\"\");\n  }\n}\n\n//Create a server\nvar server = http.createServer({}, handleRequest);\n\n//Start server\nserver.listen(PORT, function () {\n  console.log(\"Server listening on: https://localhost:\" + PORT);\n});\n```\n\nIt is recommended to store the value of the captcha in order to check the validity of the user's answer to challange\n","readmeFilename":"README.md","homepage":"https://github.com/Bestdon0610/nodejs-captcha#readme"}