Repository
Current version released
4 years ago
Dependencies
deno.land/x
Versions
Deno PromptPay
Generate Thai PromptPay QR code string and Base64-encoded images in Deno.
Getting started
import { PromptPay } from "https://deno.land/x/promptpay/mod.ts";
const promptpay = new PromptPay("0812345678", 1000);
const qrCodeString = promptpay.generate();
const base64Image = promptpay.generateBase64Data(); // Base64-encoded image
const base64Image300px = promptpay.generateBase64Data(300); // Base64-encoded image 300x300px
base64Image300px.then((qr) => {
console.log(qr);
});
Example
import { PromptPay } from "https://deno.land/x/promptpay/mod.ts";
const promptpay = new PromptPay("0812095124", 50);
const base64Image300px = promptpay.generateBase64Data(300); // Base64-encoded image
base64Image300px.then((qr) => {
console.log(qr);
});
Development
Run tests:
deno test
Dependency
- QR generator by denorg/qrcode
License
- MIT © Chonchanok MueangRuangWit and contributors