{"id":22733344,"url":"https://github.com/gillstrom/swish-qr","last_synced_at":"2025-04-14T01:53:56.625Z","repository":{"id":57376123,"uuid":"94743548","full_name":"gillstrom/swish-qr","owner":"gillstrom","description":"Generate a Swish QR code","archived":false,"fork":false,"pushed_at":"2017-06-30T12:30:45.000Z","size":67,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T01:53:50.425Z","etag":null,"topics":["cli","code","javascript","nodejs","qr","swish"],"latest_commit_sha":null,"homepage":null,"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/gillstrom.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}},"created_at":"2017-06-19T06:26:39.000Z","updated_at":"2024-08-13T11:08:42.000Z","dependencies_parsed_at":"2022-09-02T19:32:13.998Z","dependency_job_id":null,"html_url":"https://github.com/gillstrom/swish-qr","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fswish-qr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fswish-qr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fswish-qr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fswish-qr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gillstrom","download_url":"https://codeload.github.com/gillstrom/swish-qr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809032,"owners_count":21164895,"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":["cli","code","javascript","nodejs","qr","swish"],"created_at":"2024-12-10T20:13:50.426Z","updated_at":"2025-04-14T01:53:56.588Z","avatar_url":"https://github.com/gillstrom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swish-qr [![Build Status](https://travis-ci.org/gillstrom/swish-qr.svg?branch=master)](https://travis-ci.org/gillstrom/swish-qr)\n\n\u003e Generate a [Swish](https://www.getswish.se/) QR code\n\n\n## Install\n\n```\n$ npm install swish-qr\n```\n\n\n## Usage\n\n```js\nconst swishQr = require('swish-qr');\n\nswishQr({\n\tamount: 100,\n\tlock: ['amount', 'number'],\n\tmessage: 'Lorem ipsum',\n\tnumber: '0701234567'\n}).then(result =\u003e {\n\tconsole.log(result);\n\t//=\u003e 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL...'\n});\n```\n\n\n## API\n\n### swishQr(options)\n\nReturns a `Promise` resolving in to a `base64` string.\n\n### swishQr.sync(options)\n\nReturns a `base64` string.\n\n### swishQr.generateString(options)\n\nReturns a formatted string that's used to create the QR code.\n\n#### options\n\n*Required*\u003cbr\u003e\nType: `Object`\n\n##### amount\n\nType: `float`\u003cbr\u003e\nDefault: `0`\n\nThe amount of money to send.\n\n##### lock\n\nType: `Array`\u003cbr\u003e\nDefault: `[]`\n\nLock fields in the Swish application from user input.\n\n\n##### message\n\nType: `string`\u003cbr\u003e\nDefault: `''`\n\nDefine a message to send.\n\n##### number\n\nType: `string`\u003cbr\u003e\nDefault: `''`\n\nThe recipient.\n\n\n## Related\n\n* [swish-qr-cli](https://github.com/gillstrom/swish-qr-cli) - CLI for this module.\n\n\n## License\n\nMIT © [gillstrom](http://github.com/gillstrom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgillstrom%2Fswish-qr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgillstrom%2Fswish-qr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgillstrom%2Fswish-qr/lists"}