upiqr 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(r,c,n,a){function s(e){return e instanceof n?e:new n(function(r){r(e)})}return new(n||(n=Promise))(function(e,n){function t(r){try{i(a.next(r))}catch(r){n(r)}}function o(r){try{i(a["throw"](r))}catch(r){n(r)}}function i(r){r.done?e(r.value):s(r.value).then(t,o)}i((a=a.apply(r,c||[])).next())})};import{buildUPIIntent}from"./qr/intent.js";import{encodeQRMatrix,normalizeErrorCorrectionLevel}from"./qr/encoder.js";import{renderModulesToRGBA}from"./qr/pixels.js";import{resolveRenderOptions}from"./qr/options.js";import{encodePNG}from"./qr/png.js";import{warnDeprecatedAsyncDefault}from"./qr/deprecation.js";export function upiqrSync(r,e){const n=buildUPIIntent(r);try{const t=normalizeErrorCorrectionLevel(e===null||e===void 0?void 0:e.errorCorrectionLevel);const{matrix:o}=encodeQRMatrix(n,t);const i=resolveRenderOptions(o.length,e);const c=renderModulesToRGBA(o,i);const a=`data:image/png;base64,${encodePNG(c).toString("base64")}`;return{qr:a,intent:n}}catch(r){throw new Error("Unable to generate UPI QR Code.\n"+r)}}export default function upiqr(r,e){return __awaiter(this,void 0,void 0,function*(){warnDeprecatedAsyncDefault();return upiqrSync(r,e)})}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upiqr",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "Zero-dependency UPI QR code (PNG) and intent link generator for NPCI-compliant payments - works in Node.js and the browser, written in TypeScript.",
|
|
5
5
|
"homepage": "https://github.com/bhar4t/upiqr#readme",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|