{"_id":"@dullaz/qr-gen","_rev":"2-873339f49680e1c2fc75b69d22f20a32","name":"@dullaz/qr-gen","description":"QR Code generator","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@dullaz/qr-gen","version":"1.0.0","keywords":["qrcode","qr code","qr","png","svg","image"],"author":{"url":"https://github.com/Dullaz","name":"Dullaz"},"license":"MIT","_id":"@dullaz/qr-gen@1.0.0","maintainers":[{"name":"dullaz","email":"dev@dullaz.com"}],"homepage":"https://github.com/Dullaz/qr-gen","bugs":{"url":"https://github.com/Dullaz/qr-gen/issues"},"dist":{"shasum":"51ad36c53046f6266e9cba1364b8fc5612ba1d22","tarball":"https://registry.npmjs.org/@dullaz/qr-gen/-/qr-gen-1.0.0.tgz","fileCount":12,"integrity":"sha512-ZiV9+Ci2cbb9EZbbWht2FZeCHstx0osWxOFc+RAnlOR+MhjAnYTug/FVOrkldLsJSo7/t7R7KK2EFsgZXJxLOg==","signatures":[{"sig":"MEUCIQCdVEa4AmKJolOf0zbL5GAkGYeuilBg9G+/SY5RJW8PnwIgf/d66wIDHJiMQaTgcoYLuiaj63a1RrR4Tt+SRxs2E7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38889},"main":"./lib/qr.js","gitHead":"7579d2640d83661a0c93b1d2f32d48c2d570293e","scripts":{"test":"./tests/test.js"},"_npmUser":{"name":"dullaz","email":"dev@dullaz.com"},"repository":{"url":"git+https://github.com/Dullaz/qr-gen.git","type":"git"},"_npmVersion":"10.1.0","description":"QR Code generator","directories":{},"_nodeVersion":"20.9.0","dependencies":{"pako":"^2.1.0","fflate":"^0.8.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/qr-gen_1.0.0_1716322894353_0.3759894101776382","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"@dullaz/qr-gen","version":"1.1.0","keywords":["qrcode","qr code","qr","png","svg","image"],"author":{"url":"https://github.com/Dullaz","name":"Dullaz"},"license":"MIT","_id":"@dullaz/qr-gen@1.1.0","maintainers":[{"name":"dullaz","email":"dev@dullaz.com"}],"homepage":"https://github.com/Dullaz/qr-gen","bugs":{"url":"https://github.com/Dullaz/qr-gen/issues"},"dist":{"shasum":"4a7456b6761b203e500d08352f5ee01a11ee432e","tarball":"https://registry.npmjs.org/@dullaz/qr-gen/-/qr-gen-1.1.0.tgz","fileCount":13,"integrity":"sha512-2UFJKLOvzMP9E26BsbbMSqh/o07/gp/672WUVKDcT4bQwEVvq1jlegNptijVEdNWwFtdXUu/m0GYoYOsAQaHsQ==","signatures":[{"sig":"MEUCIBh0RCtt2ujaxPKTIbavsVqAcJWT0jl70UO7IjGq+fhyAiEApEVfVoIM9njhu/yOCPA1kUel+MQ9pTenV/5odn6Ny9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41091},"main":"./lib/qr.js","gitHead":"c3c1c142324b291ff625fcf32b11ffc5f0fe087a","scripts":{"test":"./tests/test.js"},"typings":"./lib/qr.d.ts","_npmUser":{"name":"dullaz","email":"dev@dullaz.com"},"repository":{"url":"git+https://github.com/Dullaz/qr-gen.git","type":"git"},"_npmVersion":"10.1.0","description":"QR Code generator","directories":{},"_nodeVersion":"20.9.0","dependencies":{"pako":"^2.1.0","fflate":"^0.8.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/qr-gen_1.1.0_1716323195004_0.42887924017057055","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2024-05-21T20:21:34.238Z","modified":"2024-07-08T15:07:43.716Z","1.0.0":"2024-05-21T20:21:34.494Z","1.1.0":"2024-05-21T20:26:35.172Z"},"maintainers":[{"name":"dullaz","email":"dev@dullaz.com"}],"author":{"url":"https://github.com/Dullaz","name":"Dullaz"},"repository":{"url":"git+https://github.com/Dullaz/qr-gen.git","type":"git"},"keywords":["qrcode","qr code","qr","png","svg","image"],"license":"MIT","homepage":"https://github.com/Dullaz/qr-gen","bugs":{"url":"https://github.com/Dullaz/qr-gen/issues"},"readme":"qr-image\n========\n\n\nUpdated version of [qr-image](https://github.com/alexeyten/qr-image) repo that seems to have been abandoned\n\nRe-introduced Pako over zlib\n\nOverview\n--------\n\n  * TBD\n\nInstalling\n-----\n\n```shell\nnpm install qr-gen\n```\n\nUsage\n-----\n\nExample:\n```javascript\nvar qr = require('qr-gen');\n\nvar qr_svg = qr.image('I love QR!', { type: 'svg' });\nqr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));\n\nvar svg_string = qr.imageSync('I love QR!', { type: 'svg' });\n```\n\nExample For generate images in client side:\n```javascript in your app.js\nvar qr = require('qr-gen');\nrouter.get('/qr', function(){\n  var code = qr.image('http://www.google.com', { type: 'png' });\n  res.setHeader('Content-type', 'image/png');  //sent qr image to client side\n  code.pipe(res);\n});\n```\nthen in the html files:\n```\n<img src=\"/qr\" alt=\"qrcode\">\n```\n\n[More examples](./examples)\n\n`qr = require('qr-gen')`\n\n### Methods\n\n  * `qr.image(text, [ec_level | options])` — Readable stream with image data;\n  * `qr.imageSync(text, [ec_level | options])` — string with image data. (Buffer for `png`);\n  * `qr.svgObject(text, [ec_level | options])` — object with SVG path and size;\n  * `qr.matrix(text, [ec_level])` — 2D array of booleans. __Y__ is indexed first (e.g. `[y][x]` NOT `[x][y]`), `[0][0]` is the top left, and `true` means black.\n\n\n### Options\n\n  * `text` — text to encode;\n  * `ec_level` — error correction level. One of `L`, `M`, `Q`, `H`. Default `M`.\n  * `options` — image options object:\n    * `ec_level` — default `M`.\n    * `type` — image type. Possible values `png` (default), `svg`, `pdf` and `eps`.\n    * `size` (png and svg only) — size of one module in pixels. Default `5` for png and `undefined` for svg.\n    * `margin` — white space around QR image in modules. Default `4` for `png` and `1` for others.\n    * `customize` (only png) — function to customize qr bitmap before encoding to PNG.\n    * `parse_url` (experimental, default `false`) — try to optimize QR-code for URLs.\n","readmeFilename":"README.md"}