{"_id":"@likecoin/qr-code-styling","_rev":"5-f10bf39d858dce7a63d4fc568c2d816f","name":"@likecoin/qr-code-styling","dist-tags":{"latest":"1.6.6"},"versions":{"1.6.1":{"name":"@likecoin/qr-code-styling","version":"1.6.1","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","_id":"@likecoin/qr-code-styling@1.6.1","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"homepage":"https://qr-code-styling.com","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"dist":{"shasum":"d60d1abadaff2a875ab44a3c371b8c9eb1ebde7c","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.1.tgz","fileCount":3,"integrity":"sha512-WEeIVHdXZ7oP7b8AhF6P6QxETM4EKMhW+JlIC6mimQoM1fhFnvBA6w4Tl99kDXevyTaB6CKn3p3/kPJktrz9lA==","signatures":[{"sig":"MEUCIBzAC5mFGNxYYxltzIcfepBL/9Ne4MdGA9zaRaLGb/1WAiEAs0A65wJnu+9gz17NLDDfOskLJvLO6FZIBwfhHuldXM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13975},"main":"lib/qr-code-styling.js","types":"lib/index.d.ts","engines":{"node":"16.x"},"gitHead":"dc9300124bc6d41a34c0a001972a20cf16b7a8c1","scripts":{"test":"jest","build":"webpack --mode=production --config webpack.config.build.js","start":"webpack serve --open --config webpack.config.dev-server.js","build:dev":"webpack --mode=development --config webpack.config.build.js"},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"repository":{"url":"git+https://github.com/likecoin/qr-code-styling.git","type":"git"},"_npmVersion":"8.19.4","description":"Add a style and an image to your QR code","directories":{},"_nodeVersion":"16.20.2","dependencies":{"qrcode-generator":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","canvas":"^2.8.0","eslint":"^7.17.0","ts-jest":"^26.4.4","webpack":"^5.12.3","prettier":"^2.2.1","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack-cli":"^4.3.1","eslint-loader":"^4.0.2","webpack-merge":"^5.7.3","eslint-plugin-jest":"^24.1.3","webpack-dev-server":"^3.11.1","html-webpack-plugin":"^4.5.1","clean-webpack-plugin":"^3.0.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.13.0","jest-environment-jsdom-fifteen":"^1.0.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/qr-code-styling_1.6.1_1701619595295_0.4256265764286036","host":"s3://npm-registry-packages"}},"1.6.2":{"name":"@likecoin/qr-code-styling","version":"1.6.2","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","_id":"@likecoin/qr-code-styling@1.6.2","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"homepage":"https://qr-code-styling.com","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"dist":{"shasum":"0c7d0e241c3030348d3dbd10a07940dc4db41301","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.2.tgz","fileCount":3,"integrity":"sha512-9/pYiAUuS87f2FnJcps/bErZ2WdirtIrLb69fT5f5DTnQjrWPabebNohpfkbOfcNlEt0fk9S0V+yFJ17Hh4Gbg==","signatures":[{"sig":"MEYCIQDmr11pypTFwSYSuPAWSWjrvjgdbYct49uHGLt0bHYVvwIhANQD0uI4XSIaOA8xSAjAo+teedgdOv80EMBEeG9QPILh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13790},"main":"lib/qr-code-styling.js","types":"lib/index.d.ts","gitHead":"b79d2a6c7f36b0f5d714561b31dd0335f27f4a8f","scripts":{"test":"jest","build":"webpack --mode=production --config webpack.config.build.js","start":"webpack serve --open --config webpack.config.dev-server.js","build:dev":"webpack --mode=development --config webpack.config.build.js"},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"repository":{"url":"git+https://github.com/likecoin/qr-code-styling.git","type":"git"},"_npmVersion":"8.19.4","description":"Add a style and an image to your QR code","directories":{},"_nodeVersion":"16.20.2","dependencies":{"qrcode-generator":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","canvas":"^2.8.0","eslint":"^7.17.0","ts-jest":"^26.4.4","webpack":"^5.12.3","prettier":"^2.2.1","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack-cli":"^4.3.1","eslint-loader":"^4.0.2","webpack-merge":"^5.7.3","eslint-plugin-jest":"^24.1.3","webpack-dev-server":"^3.11.1","html-webpack-plugin":"^4.5.1","clean-webpack-plugin":"^3.0.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.13.0","jest-environment-jsdom-fifteen":"^1.0.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/qr-code-styling_1.6.2_1701620083146_0.6112723475017778","host":"s3://npm-registry-packages"}},"1.6.3":{"name":"@likecoin/qr-code-styling","version":"1.6.3","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","_id":"@likecoin/qr-code-styling@1.6.3","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"homepage":"https://qr-code-styling.com","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"dist":{"shasum":"1bf51ad38a277b4561085a3f974a8a22c2ba8a52","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.3.tgz","fileCount":29,"integrity":"sha512-jNQR2ao+Z4V8xy/dIYtg9kDfxn8TPK5TZbhJWcf5EnKdnyXpK+rePo06hWyiD49+ed6aA7fkhrpmKB2zU/ucLw==","signatures":[{"sig":"MEYCIQDHa8BvV/NTM74faQnUt/rezLT9qurFhzcthGw6mDoYtQIhAL0k2JG3IZnVKyfwds2XZGjgSA6v3y/WA5Ct5SDFRM7N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264210},"main":"lib/qr-code-styling.js","types":"lib/index.d.ts","gitHead":"b79d2a6c7f36b0f5d714561b31dd0335f27f4a8f","scripts":{"test":"jest","build":"webpack --mode=production --config webpack.config.build.js","start":"webpack serve --open --config webpack.config.dev-server.js","build:dev":"webpack --mode=development --config webpack.config.build.js"},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"repository":{"url":"git+https://github.com/likecoin/qr-code-styling.git","type":"git"},"_npmVersion":"8.19.4","description":"Add a style and an image to your QR code","directories":{},"_nodeVersion":"16.20.2","dependencies":{"qrcode-generator":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","canvas":"^2.8.0","eslint":"^7.17.0","ts-jest":"^26.4.4","webpack":"^5.12.3","prettier":"^2.2.1","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack-cli":"^4.3.1","eslint-loader":"^4.0.2","webpack-merge":"^5.7.3","eslint-plugin-jest":"^24.1.3","webpack-dev-server":"^3.11.1","html-webpack-plugin":"^4.5.1","clean-webpack-plugin":"^3.0.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.13.0","jest-environment-jsdom-fifteen":"^1.0.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/qr-code-styling_1.6.3_1701620302791_0.09836865350339785","host":"s3://npm-registry-packages"}},"1.6.4":{"name":"@likecoin/qr-code-styling","version":"1.6.4","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","_id":"@likecoin/qr-code-styling@1.6.4","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"homepage":"https://qr-code-styling.com","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"dist":{"shasum":"7600a16c8d61114a8675adbb069529e43c29ae9c","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.4.tgz","fileCount":29,"integrity":"sha512-N9bUkGLxGVijKcfppJUl0atDwnfMyN3mkOUXNT+d3u21RRV2pI1UnxJEt47eXR4OWDnplhUxSw7/cH92CtmEXQ==","signatures":[{"sig":"MEYCIQCw5tRyLPLzOU6TFwPfzqw+MwBAw2kWe0qljs0hYSFEBQIhALBOIhCwZDpuHl/MV3Kj5zNZcyuKohnft3IGICWdRtCd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264320},"main":"lib/qr-code-styling.js","types":"lib/index.d.ts","gitHead":"b79d2a6c7f36b0f5d714561b31dd0335f27f4a8f","scripts":{"test":"jest","build":"webpack --mode=production --config webpack.config.build.js","start":"webpack serve --open --config webpack.config.dev-server.js","build:dev":"webpack --mode=development --config webpack.config.build.js"},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"repository":{"url":"git+https://github.com/likecoin/qr-code-styling.git","type":"git"},"_npmVersion":"8.19.4","description":"Add a style and an image to your QR code","directories":{},"_nodeVersion":"16.20.2","dependencies":{"qrcode-generator":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","canvas":"^2.8.0","eslint":"^7.17.0","ts-jest":"^26.4.4","webpack":"^5.12.3","prettier":"^2.2.1","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack-cli":"^4.3.1","eslint-loader":"^4.0.2","webpack-merge":"^5.7.3","eslint-plugin-jest":"^24.1.3","webpack-dev-server":"^3.11.1","html-webpack-plugin":"^4.5.1","clean-webpack-plugin":"^3.0.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.13.0","jest-environment-jsdom-fifteen":"^1.0.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/qr-code-styling_1.6.4_1701620802782_0.8456423185243567","host":"s3://npm-registry-packages"}},"1.6.5":{"name":"@likecoin/qr-code-styling","version":"1.6.5","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","_id":"@likecoin/qr-code-styling@1.6.5","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"homepage":"https://qr-code-styling.com","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"dist":{"shasum":"52ffdcc43574f9c5c3fa4a6ee5abb4fc224e6e81","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.5.tgz","fileCount":29,"integrity":"sha512-MNrbSIbU8vEdZR6/0uBZRyOCFQtbagA7mnpB3TkqLoDTTpktYHAfq9RYHxUyGJ5tdw7HZEhsQZOrzb/YoXF9fQ==","signatures":[{"sig":"MEQCIDmmjVhvxgAzZ4JtL8YM2vkPHfB6/flALkdvN/dil1T1AiBCFLadlk0Fv1rYEfG6BJ0e2pBOhOGLdklwkP0mfoiEfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264320},"main":"lib/qr-code-styling.js","types":"lib/index.d.ts","gitHead":"5dbb6dd24fe238ddf31ffd9cb87a551db61888d3","scripts":{"test":"jest","build":"webpack --mode=production --config webpack.config.build.js","start":"webpack serve --open --config webpack.config.dev-server.js","build:dev":"webpack --mode=development --config webpack.config.build.js"},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"repository":{"url":"git+https://github.com/likecoin/qr-code-styling.git","type":"git"},"_npmVersion":"9.8.1","description":"Add a style and an image to your QR code","directories":{},"_nodeVersion":"18.18.2","dependencies":{"qrcode-generator":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","canvas":"^2.8.0","eslint":"^7.17.0","ts-jest":"^26.4.4","webpack":"^5.12.3","prettier":"^2.2.1","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack-cli":"^4.3.1","eslint-loader":"^4.0.2","webpack-merge":"^5.7.3","eslint-plugin-jest":"^24.1.3","webpack-dev-server":"^3.11.1","html-webpack-plugin":"^4.5.1","clean-webpack-plugin":"^3.0.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.3.1","@typescript-eslint/parser":"^4.13.0","jest-environment-jsdom-fifteen":"^1.0.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/qr-code-styling_1.6.5_1726600735346_0.29940442125808353","host":"s3://npm-registry-packages"}},"1.6.6":{"name":"@likecoin/qr-code-styling","version":"1.6.6","publishConfig":{"access":"public"},"description":"Add a style and an image to your QR code","main":"lib/qr-code-styling.js","types":"lib/index.d.ts","dependencies":{"qrcode-generator":"^1.4.3"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^4.13.0","@typescript-eslint/parser":"^4.13.0","canvas":"^2.8.0","clean-webpack-plugin":"^3.0.0","eslint":"^7.17.0","eslint-config-prettier":"^7.1.0","eslint-loader":"^4.0.2","eslint-plugin-jest":"^24.1.3","eslint-plugin-prettier":"^3.3.1","html-webpack-plugin":"^4.5.1","jest":"^26.6.3","jest-environment-jsdom-fifteen":"^1.0.0","prettier":"^2.2.1","ts-jest":"^26.4.4","ts-loader":"^8.0.14","typescript":"^4.1.3","webpack":"^5.12.3","webpack-cli":"^4.3.1","webpack-dev-server":"^3.11.1","webpack-merge":"^5.7.3"},"scripts":{"build":"webpack --mode=production --config webpack.config.build.js","build:dev":"webpack --mode=development --config webpack.config.build.js","test":"jest","start":"webpack serve --open --config webpack.config.dev-server.js"},"repository":{"type":"git","url":"git+https://github.com/likecoin/qr-code-styling.git"},"keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"homepage":"https://qr-code-styling.com","_id":"@likecoin/qr-code-styling@1.6.6","gitHead":"6ba207fd23b42a21f1e39c253a51a4d608f7c473","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-RbGK/+20bJhFZR70r8MeDvfyz3W7U5zXpykSTYOYxZGyo6wC+Y4QnbUpL+YdAtzT2ZIFeCNOcRs2W2FNrKPoaA==","shasum":"f7783356224445b34087a039909b7ec923474030","tarball":"https://registry.npmjs.org/@likecoin/qr-code-styling/-/qr-code-styling-1.6.6.tgz","fileCount":29,"unpackedSize":264538,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERjHtyTetjUzWrF+JDB6XfMIuWDG4cpn+8mLBZ6G4rTAiApYdt4DZIIHkgX9nZE1GF9iaYZxQM+K6ogvLeA1ZXaXQ=="}]},"_npmUser":{"name":"nwingt","email":"i@ngwingt.at"},"directories":{},"maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/qr-code-styling_1.6.6_1726671865910_0.34627994260928463"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-03T16:06:35.180Z","modified":"2024-09-18T15:04:26.369Z","1.6.1":"2023-12-03T16:06:35.476Z","1.6.2":"2023-12-03T16:14:43.373Z","1.6.3":"2023-12-03T16:18:22.996Z","1.6.4":"2023-12-03T16:26:43.054Z","1.6.5":"2024-09-17T19:18:55.505Z","1.6.6":"2024-09-18T15:04:26.146Z"},"bugs":{"url":"https://github.com/kozakdenys/qr-code-styling/issues"},"author":{"name":"Denys Kozak","email":"kozak.denys.dev@gmail.com"},"license":"MIT","homepage":"https://qr-code-styling.com","keywords":["qr","qrcode","qr-code","js","qrjs","qrstyling","styling","qrbranding","branding","qrimage","image","qrlogo","logo","design"],"repository":{"type":"git","url":"git+https://github.com/likecoin/qr-code-styling.git"},"description":"Add a style and an image to your QR code","maintainers":[{"name":"aurora22","email":"aurora@liker.land"},{"name":"nwingt","email":"i@ngwingt.at"},{"name":"williamchong007","email":"williamchong007@msn.com"}],"readme":"# QR Code Styling\n[![Version](https://img.shields.io/npm/v/qr-code-styling.svg)](https://www.npmjs.org/package/qr-code-styling)\n\nJavaScript library for generating QR codes with a logo and styling.\n\nTry it here https://qr-code-styling.com\n\nIf you have issues / suggestions / notes / questions, please open an issue or contact me. Let's create a cool library together.\n### Examples\n<p float=\"left\">\n<img style=\"display:inline-block\" src=\"https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/facebook_example_new.png\" width=\"240\" />\n<img style=\"display:inline-block\" src=\"https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/qr_code_example.png\" width=\"240\" />\n<img style=\"display:inline-block\" src=\"https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/telegram_example_new.png\" width=\"240\" />\n</p>\n\n### Installation\n\n```\nnpm install qr-code-styling\n```\n\n### Usage\n\n```HTML\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>QR Code Styling</title>\n    <script type=\"text/javascript\" src=\"https://unpkg.com/qr-code-styling@1.5.0/lib/qr-code-styling.js\"></script>\n</head>\n<body>\n<div id=\"canvas\"></div>\n<script type=\"text/javascript\">\n\n    const qrCode = new QRCodeStyling({\n        width: 300,\n        height: 300,\n        type: \"svg\",\n        data: \"https://www.facebook.com/\",\n        image: \"https://upload.wikimedia.org/wikipedia/commons/5/51/Facebook_f_logo_%282019%29.svg\",\n        dotsOptions: {\n            color: \"#4267b2\",\n            type: \"rounded\"\n        },\n        backgroundOptions: {\n            color: \"#e9ebee\",\n        },\n        imageOptions: {\n            crossOrigin: \"anonymous\",\n            margin: 20\n        }\n    });\n\n    qrCode.append(document.getElementById(\"canvas\"));\n    qrCode.download({ name: \"qr\", extension: \"svg\" });\n</script>\n</body>\n</html>\n```\n---\n\n[**React example (Codesandbox)**](https://codesandbox.io/s/qr-code-styling-react-example-l8rwl?file=/src/App.js)\n\n[**Angular example (Codesandbox)**](https://codesandbox.io/s/agitated-panini-tpgb2?file=/src/app/app.component.ts)\n\n---\n\n[**React example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/react)\n\n[**Angular example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/angular)\n\n[**Vue example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/vue)\n\n---\n\n### API Documentation\n\n#### QRCodeStyling instance\n`new QRCodeStyling(options) => QRCodeStyling`\n\nParam  |Type  |Description\n-------|------|------------\noptions|object|Init object\n\n`options` structure\n\nProperty               |Type                     |Default Value|Description\n-----------------------|-------------------------|-------------|-----------------------------------------------------\nwidth                  |number                   |`300`        |Size of canvas\nheight                 |number                   |`300`        |Size of canvas\ntype                   |string (`'canvas' 'svg'`)|`canvas`     |The type of the element that will be rendered\ndata                   |string                   |             |The date will be encoded to the QR code\nimage                  |string                   |             |The image will be copied to the center of the QR code\nmargin                 |number                   |`0`          |Margin around canvas\nqrOptions              |object                   |             |Options will be passed to `qrcode-generator` lib\nimageOptions           |object                   |             |Specific image options, details see below\ndotsOptions            |object                   |             |Dots styling options\ncornersSquareOptions   |object                   |             |Square in the corners styling options\ncornersDotOptionsHelper|object                   |             |Dots in the corners styling options\nbackgroundOptions      |object                   |             |QR background styling options\n\n`options.qrOptions` structure\n\nProperty            |Type                                              |Default Value\n--------------------|--------------------------------------------------|-------------\ntypeNumber          |number (`0 - 40`)                                 |`0`\nmode                |string (`'Numeric' 'Alphanumeric' 'Byte' 'Kanji'`)|\nerrorCorrectionLevel|string (`'L' 'M' 'Q' 'H'`)                        |`'Q'`\n\n`options.imageOptions` structure\n\nProperty          |Type                                   |Default Value|Description\n------------------|---------------------------------------|-------------|------------------------------------------------------------------------------\nhideBackgroundDots|boolean                                |`true`       |Hide all dots covered by the image\nimageSize         |number                                 |`0.4`        |Coefficient of the image size. Not recommended to use ove 0.5. Lower is better\nmargin            |number                                 |`0`          |Margin of the image in px\ncrossOrigin       |string(`'anonymous' 'use-credentials'`)|             |Set \"anonymous\" if you want to download QR code from other origins.\n\n`options.dotsOptions` structure\n\nProperty|Type                                                                          |Default Value|Description\n--------|------------------------------------------------------------------------------|-------------|-------------------\ncolor   |string                                                                        |`'#000'`     |Color of QR dots\ngradient|object                                                                        |             |Gradient of QR dots\ntype    |string (`'rounded' 'dots' 'classy' 'classy-rounded' 'square' 'extra-rounded'`)|`'square'`   |Style of QR dots\n\n`options.backgroundOptions` structure\n\nProperty|Type  |Default Value\n--------|------|-------------\ncolor   |string|`'#fff'`\ngradient|object|\n\n`options.cornersSquareOptions` structure\n\nProperty|Type                                     |Default Value|Description\n--------|-----------------------------------------|-------------|-----------------\ncolor   |string                                   |             |Color of Corners Square\ngradient|object                                   |             |Gradient of Corners Square\ntype    |string (`'dot' 'square' 'extra-rounded'`)|             |Style of Corners Square\n\n`options.cornersDotOptions` structure\n\nProperty|Type                     |Default Value|Description\n--------|-------------------------|-------------|-----------------\ncolor   |string                   |             |Color of Corners Dot\ngradient|object                   |             |Gradient of Corners Dot\ntype    |string (`'dot' 'square'`)|             |Style of Corners Dot\n\nGradient structure\n\n`options.dotsOptions.gradient`\n\n`options.backgroundOptions.gradient`\n\n`options.cornersSquareOptions.gradient`\n\n`options.cornersDotOptions.gradient`\n\nProperty  |Type                        |Default Value|Description\n----------|----------------------------|-------------|---------------------------------------------------------\ntype      |string (`'linear' 'radial'`)|\"linear\"     |Type of gradient spread\nrotation  |number                      |0            |Rotation of gradient in radians (Math.PI === 180 degrees)\ncolorStops|array of objects            |             |Gradient colors. Example `[{ offset: 0, color: 'blue' }, {  offset: 1, color: 'red' }]`\n\nGradient colorStops structure\n\n`options.dotsOptions.gradient.colorStops[]`\n\n`options.backgroundOptions.gradient.colorStops[]`\n\n`options.cornersSquareOptions.gradient.colorStops[]`\n\n`options.cornersDotOptions.gradient.colorStops[]`\n\nProperty|Type            |Default Value|Description\n--------|----------------|-------------|-----------------------------------\noffset  |number (`0 - 1`)|             |Position of color in gradient range\ncolor   |string          |             |Color of stop in gradient range\n\n#### QRCodeStyling methods\n`QRCodeStyling.append(container) => void`\n\nParam    |Type       |Description\n---------|-----------|-----------\ncontainer|DOM element|This container will be used for appending of the QR code\n\n`QRCodeStyling.getRawData(extension) => Promise<Blob>`\n\nParam    |Type                                |Default Value|Description\n---------|------------------------------------|-------------|------------\nextension|string (`'png' 'jpeg' 'webp' 'svg'`)|`'png'`      |Blob type\n\n`QRCodeStyling.update(options) => void`\n\nParam  |Type  |Description\n-------|------|--------------------------------------\noptions|object|The same options as for initialization\n\n`QRCodeStyling.applyExtension(extension) => void`\n\nParam    |Type                  |Description\n---------|----------------------|------------------------------------------------------------------------------------------\nextension|(svg, options) => void|Extension is a function that takes svg and previously applied options and modifies an svg\n\n`applyExtension` example\n\n```JS\nconst extension = (svg, options) => {\n    const { width, height } = options;\n    const size = Math.min(width, height);\n    const border = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n    const borderAttributes = {\n        \"fill\": \"none\",\n        \"x\": (width - size + 40) / 2,\n        \"y\": (height - size + 40) / 2,\n        \"width\": size - 40,\n        \"height\": size - 40,\n        \"stroke\": 'black',\n        \"stroke-width\": 40,\n        \"rx\": 100,\n    };\n    Object.keys(borderAttributes).forEach(attribute => {\n      border.setAttribute(attribute, borderAttributes[attribute]);\n    });\n    svg.appendChild(border);\n};\n```\n\n`QRCodeStyling.deleteExtension() => void`\n\n`QRCodeStyling.download(downloadOptions) => Promise<void>`\n\nParam          |Type  |Description\n---------------|------|------------\ndownloadOptions|object|Options with extension and name of file (not required)\n\n`downloadOptions` structure\n\nProperty |Type                                |Default Value|Description\n---------|------------------------------------|-------------|-----------------------------------------------------\nname     |string                              |`'qr'`       |Name of the downloaded file\nextension|string (`'png' 'jpeg' 'webp' 'svg'`)|`'png'`      |File extension\n\n### Building this repo\n\nIf you get an error running `npm install` referring to `node-pre-gyp`, this is caused by an attempt to compile the [`canvas` dependency](https://github.com/Automattic/node-canvas#compiling). See Compiling instructions in the README. For example on MacOS you need to install dependencies: `brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman`.\n\n### License\n\n[MIT License](https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/LICENSE). Copyright (c) 2021 Denys Kozak\n\n","readmeFilename":"README.md"}