Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

upn-with-qr-generator

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upn-with-qr-generator

A UPN + QR code generator for Slovenian banking system

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by160%
Maintainers
0
Weekly downloads
 
Created
Source

UPN Generator

A TypeScript library for generating UPN + QR codes for Slovenian banks, complete with customizable fields and QR code export options. Essentially just a javascript rewrite of this PHP library with the same functionality.

Installation

Install via npm:

npm install upn-with-qr-generator

Usage

import { UPNGenerator, UPNWriter } from 'upn-generator';

// Define UPN data
const upnData = {
  payerName: 'Janez Novak',
  payerAddress: 'Dunajska ulica 1',
  payerPost: '1000 Ljubljana',
  receiverName: 'RentaCar d.o.o.',
  receiverAddress: 'Pohorska ulica 22',
  receiverPost: '2000 Maribor',
  receiverIban: 'SI56020170014356205',
  amount: 300.24,
  code: 'RENT',
  reference: 'SI121234567890120',
  purpose: 'Plačilo najemnine za marec',
  dueDate: '20231001'  // Format YYYYMMDD
};

// Create a UPN writer
const upnWriter = new UPNWriter(upnData);

// Save as PNG
upnWriter.saveAsPNG('./output/UPNFinal.png');

// Get as base64 string
upnWriter.png().then(base64String => {
  console.log('Base64 PNG:', base64String);
});

// Get as image buffer
upnWriter.gdResource().then(buffer => {
  console.log('Image Buffer:', buffer);
});

Above example will output:

Upn Example

License

The MIT License (MIT). Please see License File for more information.

upn-with-qr-generator

Keywords

FAQs

Package last updated on 02 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc