@ascii-kit/qr - API documentation
Functions
qrcode()
ts
function qrcode(input: string, opts?: QRcodeOpts): Promise<string>Generates a QR code string.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The input string to generate the QR code from. |
opts? | QRcodeOpts | Optional options for generating the QR code. |
Returns
Promise<string>
- A promise that resolves with the generated QR code string.
Example
ts
try {
const qrString = await qrcode('https://dovenv.pigeonposse.com');
console.log(qrString);
} catch (error) {
console.error('Error generating QR code:', error);
}Type Aliases
QRcodeOpts
ts
type QRcodeOpts: {
small: boolean;
};Type declaration
| Name | Type |
|---|---|
small | boolean |
