Package Exports
- promptparse
- promptparse/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (promptparse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PromptParse
💸 PromptPay (and EMVCo-compatible) QR Code Payload Parser and Generator
Features
- Parses PromptPay or other EMVCo-compatible QR Code Data
- Construct TLV Tags into QR Code Data (uses to create QR Code)
- Pre-made generators for PromptPay and other Thai QR Standards (and non-standards)
Usage
Parsing data and get value from tag
import { parse } from 'promptparse'
// Example data
const ppqr = parse('000201010211...')
// Get Tag ID '00'
ppqr.getTagValue('00') // Returns '01'
Build QR data
import { encode, tag, withCrcTag } from 'promptparse'
// Example data
const data = [
tag('00', '01'),
tag('01', '11'),
// ...
]
// Set CRC Tag ID '63'
withCrcTag(encode(data), '63') // Retruns '000201010211...'
References
License
This project is MIT licensed (see LICENSE.md)