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

spayd

v3.0.4

Published

An SPAYD generator implemented in js.

Downloads

3,274

Readme

build status dependencies npm version

spayd-js

An implementation of Short-Payment-Descriptor library in JavaScript/TypeScript. Primarily used for generating QR-Payments.

Installation

# yarn
yarn add spayd

# npm
npm install spayd --save

Usage

import spayd from 'spayd';

const payment = {
  acc: 'CZ2806000000000168540115',
  am: '450.00',
  cc: 'CZK',
  msg: 'Payment for some stuff',
  xvs: '1234567890'
};

// print just the SPAYD string
console.log(spayd(payment));
import qrcode from 'qrcode';
import spayd from 'spayd';

const qrCodeEl = document.getElementById('qr');

const payment = {
  acc: 'CZ2806000000000168540115',
  am: '450.00',
  cc: 'CZK',
  msg: 'Payment for some stuff',
  xvs: '1234567890'
};

const spaydString = spayd(payment);

// generate and assign qr-payment to an image element
qrcode.toDataURL(spaydString)
  .then((url) => {
    qrCodeEl.setAttribute('src', url);
  })
  .catch(console.error);

Options

| Required | Descriptor | Format | Description | Example | | --- | --- | --- | --- | --- | | ☑ | acc | string | account number in IBAN format or IBAN+BIC format | "CZ5855000000001265098001+RZBCCZPP" | | ☐ | altAcc | string[] | array of alternative accounts (usage of these accounts depends on the bank app implementation) | [ "CZ5855000000001265098001+RZBCCZPP", "CZ5855000000001265098001" ] | | ☑ | am | string | amount of money to transfer in floating point number string | "480.55" | | ☐ | cc | string | currency in ISO 4217 format | "CZK" | | ☐ | rf | number | payment identifier for the receiver | 1234567890123456 | | ☐ | rn | string | receiver's name | "PETR DVORAK" | ☐ | dt | Date | due date | new Date(2018, 3, 20) | | ☐ | pt | string | payment type | "P2P" | | ☐ | msg | string | message for receiver | "Payment for some stuff" | | ☐ | crc32 | string | CRC32 hashsum of this SPAYD payment | "1234ABCD" | | ☐ | xper | string | number of days to retry the payment | "7" | | ☐ | xvs | string | variable symbol | "1234567890" | | ☐ | xss | string | specific symbol | "1234567890" | | ☐ | xks | string | constant symbol | "1234567890" | | ☐ | xid | string | payment identifier for the payer | "ABCDEFGHIJ1234567890" |

For more info about SPAYD descriptors, see:

Package variants

As of version >=3.0, the default export is in the UMD format. This enables you to use the package both in the browser and in nodejs. Plus, it allows it to target legacy browsers, like IE11. If you encounter no troubles with the default export, feel free to keep using it.

If you wanted import specifically an ES6 or CommonJS version of spayd, use the "/esm" or "/cjs" subpath respectively.

// pure ES6 version
import spayd from "spayd/esm";

// CommonJS version
const spayd = require("spayd/cjs");