{"id":21009005,"url":"https://github.com/avin/sexy-qr","last_synced_at":"2025-05-15T02:32:53.405Z","repository":{"id":37758578,"uuid":"437325710","full_name":"avin/sexy-qr","owner":"avin","description":"Sexy SVG QR-code generator","archived":false,"fork":false,"pushed_at":"2023-12-04T10:37:24.000Z","size":956,"stargazers_count":44,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T10:09:06.951Z","etag":null,"topics":["javascript","qr","qrcode","qrcode-generator","rounded-corners","svg"],"latest_commit_sha":null,"homepage":"https://avin.github.io/sexy-qr/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-11T15:59:08.000Z","updated_at":"2024-10-06T17:35:27.000Z","dependencies_parsed_at":"2024-10-23T07:47:07.436Z","dependency_job_id":null,"html_url":"https://github.com/avin/sexy-qr","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"2d9044afd94a1ab66759e7867df35ed3c7cd210f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Fsexy-qr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Fsexy-qr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Fsexy-qr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Fsexy-qr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avin","download_url":"https://codeload.github.com/avin/sexy-qr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324104,"owners_count":17456460,"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":["javascript","qr","qrcode","qrcode-generator","rounded-corners","svg"],"created_at":"2024-11-19T09:15:09.981Z","updated_at":"2024-11-19T09:15:10.649Z","avatar_url":"https://github.com/avin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sexy-QR\n\nSexy SVG QR-code generator\n\n[ \u003e\u003e [Online demo](https://avin.github.io/sexy-qr) \u003c\u003c ]\n\n## Install\n\n```sh\nnpm install sexy-qr\n```\n\n## API\n\n### `QRCode`\n\n#### Options\n\n| Field     | Type                    | Description      |\n| --------- | ----------------------- | ---------------- |\n| `content` | `string`                | QR encoded value |\n| `ecl`     | `'L' / 'M' / 'Q' / 'H'` | Error correction |\n\n#### Properties:\n\n| Property | Description         |\n| -------- | ------------------- |\n| `matrix` | Matrix array        |\n| `size`   | Side size of matrix |\n\n#### Methods:\n\n| Method        | Values              | Description             |\n| ------------- | ------------------- | ----------------------- |\n| `emptyCenter` | (emptySize: number) | Remove points in center |\n\n### `QRSvg`\n\n#### Options\n\n| Field                     | Type              | Description                               |\n| ------------------------- | ----------------- | ----------------------------------------- |\n| `fill`                    | `string`          | SVG fill color                            |\n| `size`                    | `number`          | Size of SVG in px                         |\n| `radiusFactor`            | `number`          | Factor of points corner radius (0-1)      |\n| `cornerBlockRadiusFactor` | `number`          | Factor of big squares corner radius (0-3) |\n| `cornerBlocksAsCircles`   | `boolean`         | Draw big corner squares as circles        |\n| `roundOuterCorners`       | `boolean`         | Round outer corners                       |\n| `roundInnerCorners`       | `boolean`         | Round inner corners                       |\n| `preContent`              | `string` / `func` | Pre content of SVG code                   |\n| `postContent`             | `string` / `func` | Post content of SVG code                  |\n\n#### Properties\n\n| Property    | Description               |\n| ----------- | ------------------------- |\n| `svg`       | Result SVG code           |\n| `paths`     | Array of path-strings     |\n| `pointSize` | Side size of one qr point |\n\n## Usage\n\n```js\nimport { QRCode, QRSvg } from 'sexy-qr';\n\nconst svgCode = (() =\u003e {\n  const qrCode = new QRCode({\n    content: 'https://avin.github.io/sexy-qr',\n    ecl: 'M', // 'L' | 'M' | 'Q' | 'H'\n  });\n\n  const qrSvg = new QRSvg(qrCode, {\n    fill: '#182026',\n    cornerBlocksAsCircles: true,\n    size: 380, // px\n    radiusFactor: 0.75, // 0-1\n    cornerBlockRadiusFactor: 2, // 0-3\n    roundOuterCorners: true,\n    roundInnerCorners: true,\n    preContent: '\u003c!-- QR Code --\u003e',\n  });\n\n  return qrSvg.svg;\n})();\n```\n\n## Demo\n\n| Example 1                                                      | Example 2                                                      | Example 3                                                      | Example 4                                                      |\n| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |\n| [![Preview](./assets/ex1.svg)](https://avin.github.io/sexy-qr) | [![Preview](./assets/ex2.svg)](https://avin.github.io/sexy-qr) | [![Preview](./assets/ex3.svg)](https://avin.github.io/sexy-qr) | [![Preview](./assets/ex4.svg)](https://avin.github.io/sexy-qr) |\n\n## License\n\nMIT © [avin](https://github.com/avin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favin%2Fsexy-qr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favin%2Fsexy-qr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favin%2Fsexy-qr/lists"}