Save QR image as base64

Is it possible to save a generated QR code as a base64 image?

Answered my own question. Simple as… Posting here for others.

QRCode.toDataURL()