Skip to content

sctg-development/ts-currencies

Repository files navigation

🌍 @sctg/currencies

A comprehensive TypeScript library providing easy access to ISO currency codes and related information.

npm version License: MIT

🚀 Features

  • Complete list of ISO currency codes
  • Detailed information for each currency, including:
    • ISO code
    • Fraction digits
    • Currency name
    • Symbol (where available)
    • Unicode representation
    • HTML and Hex codes
    • Countries using the currency

📦 Installation

npm install @sctg/currencies

🛠️ Usage

import { IsoCode, IsoCodes, isoCodes } from '@sctg/currencies';

// Get information about a specific currency
const usdInfo = isoCodes.USD;
console.log(usdInfo);

// Output:
// {
//   isoCode: '840',
//   fractionDigit: 2,
//   symbol: '$',
//   unicode: 'U+00024',
//   htmlCode: '$',
//   hexCode: '$',
//   currencyName: 'US Dollar',
//   countries: ['United States of America (The)', 'Puerto Rico', ...]
// }

📚 API

IsoCode

A type representing all available ISO currency codes.

IsoCodes

An interface describing the structure of the currency information object.

isoCodes

An object containing detailed information for all ISO currencies.

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📄 License

This project is MIT licensed.