bic-extractor
v1.0.7
Published
A simple utility to generate the Bank Identifier Code (BIC) from an International Bank Account Number (IBAN). This tool includes mappings for most banks in Spain, and users can add banks from their own countries.
Downloads
403
Maintainers
Readme
IBAN to BIC Generator
This project provides a simple utility to generate the Bank Identifier Code (BIC) from an International Bank Account Number (IBAN).
Currently, the generator includes the majority of banks from Spain. However, users are encouraged to add their local banks from other countries to expand the database and improve the utility for everyone.
Usage
To use this utility, simply pass an IBAN to the function, and it will return the corresponding BIC.
Installation
npm i bic-extractor
Usage
You can test the BIC generation by modifying the ibanInput
variable in the index.js
file.
const generateBIC = require('bic-extractor'); // Make sure to import the function
const ibanInput = 'ESBBVA0000001234567890'; // Change this IBAN to test
const bicCode = generateBIC(ibanInput); // Call the function to get the BIC
console.log(`The BIC for IBAN ${ibanInput} is: ${bicCode}`);
Example Output
If you run the above code with a valid IBAN, the console might output:
The BIC for IBAN ESBBVA0000001234567890 is: BBVAESMMXXX