react-iban-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

React-IBAN-Generator

A lightweight and easy-to-use custom hook for converting Account Number to IBAN Code in React applications.

Installation

You can install the package via npm:

npm install use-iban-generator

Usage

Import

Import the {AccountType, useIBANGenerator} hook into your component:

import {AccountType, useIBANGenerator} from "react-iban-generator";

Use in Component

Use the useIBANGenerator hook in your component:

    const iban = useIBANGenerator({
        accountNumber: 'account number',
        accountType: AccountType.seporde or AccountType.tashilat,
        bankId: 'Id of your bank',
        countryCode: 'IR'
    });

Parameters

  • accountNumber: A string representing the account number.
  • accountType: An enum representing the account type.
  • bankId: A string representing the bank identifier.
  • countryCode: A string representing the country code.

Bank IDs Reference

If you are looking for the ID of a specific bank, you can find it in the list below:

  • آینده (Ayandeh Bank)

    • ID: "062"
  • اقتصاد نوین (Eghtesad Novin Bank)

    • ID: "055"
  • کارآفرین (Karafarin Bank)

    • ID: "053"
  • کشاورزی (Keshavarzi Bank)

    • ID: "016"
  • مسکن (Maskan Bank)

    • ID: "014"
  • ملی (Melli Bank)

    • ID: "017"
  • ملت (Mellat Bank)

    • ID: "012"
  • پارسیان (Parsian Bank)

    • ID: "054"
  • پاسارگاد (Pasargad Bank)

    • ID: "057"
  • پست بانک (Post Bank)

    • ID: "021"
  • رفاه (Refah Bank)

    • ID: "013"
  • صادرات (Saderat Bank)

    • ID: "019"
  • سامان (Saman Bank)

    • ID: "021"
  • صنعت معدن (Sanat Madan Bank)

    • ID: "022"
  • سرمایه (Sarmaye Bank)

    • ID: "058"
  • سپه (Sepah Bank)

    • ID: "015"

Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

License

This package is open-sourced software licensed under the MIT license.

Package Sidebar

Install

npm i react-iban-generator

Weekly Downloads

4

Version

1.0.4

License

MIT

Unpacked Size

15.3 kB

Total Files

9

Last publish

Collaborators

  • alirezawmoadi