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

ec-superserver

v0.0.13

Published

General Codes

Readme

@develit-io/general-codes

📦 @develit-io/general-codes is a utility package that provides standardized codes for countries, currencies, languages, and exchange rate providers. It serves as a central repository for handling common reference data in applications.

📥 Installation

pnpm add @develit-io/general-codes

🚀 Features

  • 🌍 Countries – Standardized country codes and names.
  • 💱 Currencies – Includes fiat and crypto currencies with provider mapping.
  • 🗣 Languages – Language codes and names.
  • 🔗 Currency Providers – Defines supported exchange rate providers with configurable API endpoints.

📚 Usage

Importing Data

import { CODES, COUNTRIES, CURRENCIES, LANGUAGES, CURRENCY_PROVIDERS } from "@develit-io/general-codes";

console.log(COUNTRIES); // List of country codes
console.log(CURRENCIES); // List of fiat and crypto currencies
console.log(LANGUAGES); // Language codes
console.log(CURRENCY_PROVIDERS); // Exchange rate providers

// Importing types
const country: CODES.Country = {...};
const currency: CODES.Currency = {...};

🔹 Data Structure

🌍 Countries (COUNTRIES)

Each country entry follows this structure:

type Country = {
  code2: string;
  code3: string;
  currency: string;
  phoneCode: string;
  name: string;
  native: string;
  vat: number;
  priority?: number;
  translatedName?: string;
};

💱 Currencies (CURRENCIES)

Currencies include fiat and crypto, each having a type and supported providers.

type Currency = {
  code: string;
  symbol: string;
  symbolBefore: boolean;
  name: string;
  providers: CurrencyProvider[]
};

🗣 Languages (LANGUAGES)

Languages are stored as ISO codes with names.

type Language = {
  code: string;
  name: string;
  native: string;
  cs: string;
};

🔗 Currency Providers (CURRENCY_PROVIDERS)

Defines API providers for currency exchange rates, with endpoint templates.

type CurrencyProviderId = 'currencyLayer' | 'currencyCloud' | 'CNB' | 'kraken' | 'binance';

type CurrencyProvider = {
  id: CurrencyProviderId;
  url: string;
};

Example provider definitions:

const CURRENCY_PROVIDERS: Record<CurrencyProviderId, CurrencyProvider> = {
  currencyLayer: { id: "currencyLayer", url: "https://api.currencylayer.com/live?access_key=YOUR_ACCESS_KEY&currencies={target}&source={base}" },
  currencyCloud: { id: "currencyCloud", url: "https://api.currencycloud.com/v2/rates/detailed?buy_currency={target}&sell_currency={base}" },
  kraken: { id: "kraken", url: "https://api.kraken.com/0/public/Ticker?pair={base}{target}" },
  binance: { id: "binance", url: "https://api.binance.com/api/v3/ticker/price?symbol={base}{target}" },
  CNB: { id: "CNB", url: "https://api.cnb.cz/exchange-rate?base={base}&target={target}" }
};

🛠 Development

To contribute or modify, install dependencies and build:

pnpm install
pnpm build

Run tests:

pnpm test

📄 License

Open Source © Develit.io - Made with 💚