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

coin-library

v1.1.2

Published

Cryptocurrency and token icons plus bank icons as a reusable asset library

Readme

coin-library

A package of cryptocurrency and token icons plus bank icons you can use in apps and sites. Coins are exposed by name (e.g. bitcoin, ethereum); banks use slug-style names (e.g. amar-bank, bca). Both use a small, consistent API.

Installation

Use locally (no publish):

# From your project
npm install C:\Projects\coin-library
# or
npm install /path/to/coin-library

After publishing to npm:

npm install coin-library

Usage

Node / bundlers (CommonJS)

const { getPath, getFile, list, count, getBankPath, getBankFile, listBanks, countBanks } = require('coin-library');

// ---- Coins ----
const path = getPath('bitcoin');       // absolute path to coin icon
const file = getFile('ethereum');      // "ethereum.png"
const coins = list();                 // [{ name, file, slug }, ...]
console.log(count());                 // 659

// ---- Banks ----
const bankPath = getBankPath('amar-bank');   // absolute path to bank icon
const bankFile = getBankFile('bca');          // e.g. "banks/private-banks/bca.png"
const banks = listBanks();                    // [{ name, file, slug }, ...]
console.log(countBanks());                    // 157

ESM

import { getPath, getFile, list, count, getBankPath, getBankFile, listBanks, countBanks } from 'coin-library';

const path = getPath('1inch');
const file = getFile('ethereum');
const all = list();

const bankPath = getBankPath('amar-bank');
const bankFile = getBankFile('bca');
const allBanks = listBanks();

TypeScript

Types are included. Import as above; list() returns CoinEntry[], and listBanks() returns BankEntry[] (same shape: name, file, slug).

In the browser

If you bundle the app (Vite, Webpack, etc.), use getPath() or getFile() and point your asset pipeline at the returned path so the PNG is copied or referenced. For a simple setup, use getFile('bitcoin') and serve the node_modules/coin-library/*.png files from your static server at a route like /icons/, then use <img src="/icons/bitcoin.png" />.

Name matching

Coins: matched case-insensitive and by slug (spaces become hyphens). Examples:

  • getPath('bitcoin')bitcoin.png
  • getPath('Bitcoin') → same
  • getPath('binance coin')binance coin.png (file has a space)

Banks: use slug-style names (lowercase, hyphens). Examples:

  • getBankPath('amar-bank') → path to that bank’s PNG
  • getBankPath('BCA') → same (case-insensitive)
  • getBankFile('bca-digital')"banks/private-banks/bca-digital.png"

API

Coins

| Method | Returns | Description | |------------------|-------------------|------------------------------------------| | getPath(name) | string \| null | Absolute filesystem path to the coin PNG | | getFile(name) | string \| null | Relative path (e.g. "icons/bitcoin.png") | | list() | CoinEntry[] | All coins (name, file, slug) | | count() | number | Number of coin icons |

Banks

| Method | Returns | Description | |-----------------------|-------------------|------------------------------------------| | getBankPath(name) | string \| null | Absolute filesystem path to the bank PNG | | getBankFile(name) | string \| null | Relative path (e.g. "banks/.../amar-bank.png") | | listBanks() | BankEntry[] | All banks (name, file, slug) | | countBanks() | number | Number of bank icons |

Rebuilding the manifest

If you add or remove PNG files in the package, regenerate the manifest:

cd node_modules/coin-library   # or your package path
npm run build:manifest

Or from the package source:

cd /path/to/coin-library
node build-manifest.js

License

MIT