{"id":21585975,"url":"https://github.com/magiclen/node-qr-code","last_synced_at":"2026-02-14T04:41:15.924Z","repository":{"id":96040908,"uuid":"115030631","full_name":"magiclen/node-qr-code","owner":"magiclen","description":"Encode QR Code by using N-API.","archived":false,"fork":false,"pushed_at":"2024-10-23T06:23:00.000Z","size":448,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T11:02:30.037Z","etag":null,"topics":["nodejs","qrcode","rust"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/magiclen.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":"2017-12-21T17:28:40.000Z","updated_at":"2024-10-23T06:22:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"eaaccc74-2cf1-4926-b662-e0b87e800193","html_url":"https://github.com/magiclen/node-qr-code","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.022727272727272707","last_synced_commit":"04a77005e387a98884d38c5a0d66ff4fa4ddc3ee"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-qr-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-qr-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-qr-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-qr-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/node-qr-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288400,"owners_count":21078904,"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":["nodejs","qrcode","rust"],"created_at":"2024-11-24T15:12:18.195Z","updated_at":"2026-02-14T04:41:10.881Z","avatar_url":"https://github.com/magiclen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"magic-qr-code\n=================================\n\n[![CI](https://github.com/magiclen/node-qr-code/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/node-qr-code/actions/workflows/ci.yml)\n\nEncode QR Code by using N-API. The QR code generating library is [QR Code generator library](https://www.nayuki.io/page/qr-code-generator-library \"QR Code generator library\")\n\nYou need to set up the Rust development environment: [rustup](https://rustup.rs/)\n\n## Usage\n\n### Encode QR Code\n\nYou can use the `encodeString` function to encode a string or use the `encodeBuffer` function to encode a buffer into QR Code data which is an array of buffers (`Buffer[]`).\n\n```typescript\nimport { encodeString } from \"magic-qr-code\";\n\nconst result = encodeString(\"https://magiclen.org\".toUpperCase());\n/*\n [\n  \u003cBuffer 01 01 01 01 01 01 01 00 01 01 00 00 01 00 01 01 01 01 01 01 01\u003e,\n  \u003cBuffer 01 00 00 00 00 00 01 00 01 01 01 00 00 00 01 00 00 00 00 00 01\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 01 01 01 00 00 00 01 00 01 01 01 00 01\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 00 01 01 01 00 00 01 00 01 01 01 00 01\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 01 00 00 01 01 00 01 00 01 01 01 00 01\u003e,\n  \u003cBuffer 01 00 00 00 00 00 01 00 00 01 00 01 01 00 01 00 00 00 00 00 01\u003e,\n  \u003cBuffer 01 01 01 01 01 01 01 00 01 00 01 00 01 00 01 01 01 01 01 01 01\u003e,\n  \u003cBuffer 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00\u003e,\n  \u003cBuffer 01 00 00 01 01 01 01 01 01 00 00 01 00 01 00 00 01 00 01 01 01\u003e,\n  \u003cBuffer 01 00 01 00 01 01 00 01 01 01 01 01 01 01 00 01 01 00 00 00 00\u003e,\n  \u003cBuffer 00 00 01 00 01 00 01 00 01 01 01 01 00 00 01 00 00 01 00 00 00\u003e,\n  \u003cBuffer 00 01 01 01 01 00 00 01 01 01 01 00 01 01 00 00 01 00 01 01 00\u003e,\n  \u003cBuffer 00 01 00 01 00 01 01 00 01 01 01 01 00 01 01 01 00 01 00 01 01\u003e,\n  \u003cBuffer 00 00 00 00 00 00 00 00 01 01 00 00 00 01 00 00 01 01 01 00 00\u003e,\n  \u003cBuffer 01 01 01 01 01 01 01 00 01 00 01 00 00 01 00 00 00 01 01 01 00\u003e,\n  \u003cBuffer 01 00 00 00 00 00 01 00 01 00 01 01 00 01 00 01 00 01 01 00 00\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 01 01 01 00 01 00 01 01 00 01 01 00 00\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 01 00 00 00 00 01 00 01 01 00 01 00 00\u003e,\n  \u003cBuffer 01 00 01 01 01 00 01 00 00 01 00 00 00 00 01 00 00 01 00 01 01\u003e,\n  \u003cBuffer 01 00 00 00 00 00 01 00 00 00 00 00 00 00 01 01 00 00 01 01 00\u003e,\n  \u003cBuffer 01 01 01 01 01 01 01 00 01 01 00 01 01 01 00 00 00 01 00 01 00\u003e\n ]\n*/\n```\n\nEncoding QR code, you can also set the error correction level by passing a `ErrorCorrection` number to the second argument.\n\n```typescript\nimport { encodeString, ErrorCorrection } from \"magic-qr-code\";\n\nconst result = encodeString(\"https://magiclen.org\".toUpperCase(), ErrorCorrection.High);\n```\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-qr-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Fnode-qr-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-qr-code/lists"}