{"id":15357168,"url":"https://github.com/gera2ld/qrcanvas","last_synced_at":"2025-05-16T09:00:23.900Z","repository":{"id":47545541,"uuid":"74490957","full_name":"gera2ld/qrcanvas","owner":"gera2ld","description":"Generate characteristic qrcodes with a canvas.","archived":false,"fork":false,"pushed_at":"2024-10-04T02:34:54.000Z","size":226,"stargazers_count":407,"open_issues_count":1,"forks_count":64,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-11T11:07:01.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gera2ld.github.io/qrcanvas/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gera2ld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-22T16:20:06.000Z","updated_at":"2025-05-10T14:04:30.000Z","dependencies_parsed_at":"2024-10-16T03:41:27.048Z","dependency_job_id":"71b97b46-e13d-4e1a-abff-5ed1017f75af","html_url":"https://github.com/gera2ld/qrcanvas","commit_stats":{"total_commits":111,"total_committers":4,"mean_commits":27.75,"dds":0.05405405405405406,"last_synced_commit":"9f31d055da5558393f23dbf938f8f3543a0d9b53"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gera2ld%2Fqrcanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gera2ld%2Fqrcanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gera2ld%2Fqrcanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gera2ld%2Fqrcanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gera2ld","download_url":"https://codeload.github.com/gera2ld/qrcanvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501548,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:33:39.176Z","updated_at":"2025-05-16T09:00:23.822Z","avatar_url":"https://github.com/gera2ld.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QRCanvas\n\n![NPM](https://img.shields.io/npm/v/qrcanvas.svg)\n![License](https://img.shields.io/npm/l/qrcanvas.svg)\n![Downloads](https://img.shields.io/npm/dt/qrcanvas.svg)\n\nThis is a QRCode generator written in pure javascript.\n\nBased on [Kazuhiko Arase's QRCode](http://www.d-project.com/).\n\nThe only requirement is that the browser works with a `canvas`,\nwhich is supported by most modern browsers.\n\n## Usage\n\n### With bundlers\n\nInstall as a dependency:\n\n```sh\n$ yarn add qrcanvas\n# or\n$ npm install qrcanvas -S\n```\n\nUse as a module:\n\n``` js\nimport { qrcanvas } from 'qrcanvas';\n\nconst canvas = qrcanvas({\n  data: 'hello, world'\n});\ndocument.body.appendChild(canvas);\n```\n\n### Browser\n\nLoad from CDN:\n\n``` html\n\u003cdiv id=\"qrcode\"\u003e\u003c/div\u003e\n\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/qrcanvas@3\"\u003e\u003c/script\u003e\n```\n\nThe module is mounted to a global variable named `qrcanvas`:\n\n``` js\nconst canvas = qrcanvas.qrcanvas({\n  data: 'hello, world'\n});\ndocument.getElementById('qrcode').appendChild(canvas);\n```\n\n### Node.js\n\n[node-canvas](https://github.com/Automattic/node-canvas) is required in Node.js.\n\nInstall dependencies:\n\n```sh\n$ yarn add qrcanvas canvas\n```\n\n``` js\nconst fs = require('fs');\nconst { qrcanvas, setCanvasModule } = require('qrcanvas');\n\n// Enable node-canvas\nsetCanvasModule(require('canvas'));\n\nconst canvas = qrcanvas({\n  data: 'hello, world'\n});\n// canvas is an instance of `node-canvas`\ncanvas.pngStream().pipe(fs.createWriteStream('qrcode.png'));\n```\n\n## Documents\n\n- [Demo](https://gera2ld.github.io/qrcanvas/)\n- [Docs](https://gera2ld.github.io/qrcanvas/docs/)\n- [Examples](https://gera2ld.github.io/qrcanvas/examples/)\n\n## Related\n\n- [qrcanvas-vue](https://github.com/gera2ld/qrcanvas-vue)\n- [qrcanvas-react](https://github.com/gera2ld/qrcanvas-react)\n\n## Snapshots\n\n![1](https://user-images.githubusercontent.com/3139113/39859468-8acec31a-546c-11e8-83b6-10e889423e88.png)\n\n![2](https://user-images.githubusercontent.com/3139113/39859482-9b6c0d68-546c-11e8-83cd-d03a148c3e70.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgera2ld%2Fqrcanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgera2ld%2Fqrcanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgera2ld%2Fqrcanvas/lists"}