ibanjs-aion is node package based on 'ibankit-js'
npm i ibanjs-aion
import { IBAN } from 'ibanjs-aion'
IBAN.isValid("AT611904300234573201") // === true
IBAN.isValid("DE89 3704 0044 0532 0130 00") // == true
IBAN.isValid("hello world"); // == false
- IBAN
- BIC
import { CountryCode, IBANBuilder, IBAN } from 'ibanjs-aion'
// How to generate IBAN
const ibanStr = new IBANBuilder()
.countryCode(CountryCode.BH)
.bankCode("BMAG")
.accountNumber("00001299123456")
.build()
.toString()
// How to create IBAN object from String
const iban = new IBAN("DE89370400440532013000")
// The library ignores spaces in IBANs, this is valid
const iban = new IBAN("DE89 3704 0044 0532 0130 00")
// For testing, the library will also generate random IBANs
const iban = IBAN.random(CountryCode.AT)
const iban = IBAN.random()
const iban = new IBANBuilder()
.countryCode(CountryCode.AT)
.bankCode("19043")
.build()
// you can quickly check validity
IBAN.isValid("AT611904300234573201"); // === true
IBAN.isValid("DE89 3704 0044 0532 0130 00"); // == true
IBAN.isValid("hello world"); // == false
import { BIC } from 'ibanjs-aion'
// How to create BIC object from String
const bic = new BIC("DEUTDEFF")
// Check to see is BIC code is valid
BIC.isValid("DEUTDEFF50")
npm test
// single test
npm test -- Bic