You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(usage): add anchor links from method names to section headings 📝
- Link method names in Methods Overview table to corresponding section headings
- Link method names in Pick a Method by What You Need table to section headings
| Draw on my own canvas |[`QRCode.toCanvas`](#tocanvas)|`toCanvas(ctx, { value: '…' })`|
66
+
| Get an SVG to show or save |[`QRCode.toSVG`](#tosvg-full-options)|`toSVG({ value: '…', size: 400 })`|
67
+
| Get GIF for `<img>` or download |[`QRCode.toDataURL`](#toascii-todataurl-totabletag)|`toDataURL({ value: '…' })`|
68
+
| Get HTML img tag (GIF, alt) |[`QRCode.toImgTag`](#toimgtag)|`toImgTag({ value: '…', alt: 'QR code' })`|
69
+
| Get HTML table |[`QRCode.toTableTag`](#toascii-todataurl-totabletag)|`toTableTag({ value: '…' })`|
70
+
| Get path string for custom draw |[`QRCode.toPath`](#topath-path-only)|`toPath({ value: '…', size: 400 })`|
71
+
| Get PNG for `<img>` or download |[`QRCode.toPNG`](#topng)|`await QRCode.toPNG({ value: '…', color: '#000', background: '#fff' })`|
72
+
| Print QR in terminal |[`QRCode.toASCII`](#toascii-todataurl-totabletag)|`toASCII({ value: '…' })`|
73
+
| Write SVG to file or download |[`QRCode.toFile`](#tofile)|`toFile('out.svg', { value: '…', size: 400 })`|
74
+
| Write SVG to a stream |[`QRCode.toFileStream`](#tofilestream)|`toFileStream(stream, { value: '…', size: 400 })`|
75
75
76
76
> [!NOTE]
77
77
> Every method needs at least `value` (the text or URL to encode). `toSVG`, `toPath`, `toFile`, and `toFileStream` also need `size` (width/height in pixels). `toASCII`, `toDataURL`, `toImgTag`, `toPNG`, and `toTableTag` use optional `cellSize` and `margin` for dimensions.
0 commit comments