Skip to content

LLM Resources

@ascii-kit/qr - API documentation

Functions

qrcode()

ts
function qrcode(input: string, opts?: QRcodeOpts): Promise<string>

Generates a QR code string.

Parameters

ParameterTypeDescription
inputstringThe input string to generate the QR code from.
opts?QRcodeOptsOptional 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

NameType
smallboolean