npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@paybysquare/core

v0.1.0

Published

Pay By Square (Slovak payment QR standard) payload generator. Zero runtime dependencies; runs in Node, browsers and edge runtimes.

Readme

@paybysquare/core

Pay By Square payload generator — the Slovak Banking Association's payment QR standard. Zero runtime dependencies; pure TypeScript that runs in Node, browsers, and edge runtimes (no native modules, no WASM).

Part of the paybysquare/php multi-language suite: the same contract is implemented in PHP (paybysquare/php on Packagist, with a Laravel integration) and served by a hosted/self-hostable HTTP API — all verified against one shared set of test vectors.

Install

npm install @paybysquare/core

Usage

import { generatePayload } from '@paybysquare/core';

const payload = generatePayload({
  amount: 25.5,
  iban: 'SK7283300000009111111118',
  swift: 'FIOZSKBAXXX',
  variableSymbol: '2026001',
  beneficiaryName: 'Acme s.r.o.',
  note: 'Invoice FA20260103',
});
// payload is the string to put into a QR code

Pair it with any QR library, e.g. qrcode:

import QRCode from 'qrcode';

const dataUrl = await QRCode.toDataURL(generatePayload(payment));

Input

| Field | Required | Notes | |---|---|---| | amount | yes | positive, max 2 decimal places (not rounded — rejected) | | iban | yes | spaces allowed, case-insensitive | | beneficiaryName | yes | non-empty | | currency | no | ISO 4217, default EUR | | date | no | Date or 'YYYY-MM-DD', default today | | swift | no | 8 or 11 characters | | variableSymbol / specificSymbol | no | up to 10 digits | | constantSymbol | no | up to 4 digits | | note | no | up to 140 characters | | beneficiaryAddress1 / 2 | no | up to 70 characters |

Invalid input throws ValidationError with a field property naming the offending field.

Correctness

Every release passes the shared test vectors: payloads are decoded by an independent liblzma-based reference verifier and the recovered data must match the spec byte-for-byte. The LZMA stream this package emits is literal-coded — roughly 10–20% longer than liblzma's output (at most one QR version larger; scannability is unaffected) — and decodable by any conforming LZMA decoder.

Trademark note

PAY by square is a payment standard of the Slovak Banking Association. This is an independent open-source implementation, not affiliated with or endorsed by the SBA or Bysquare.

License

MIT © usmansher