← All packages

@lacspace/iban

v1.0.0Global Data Kit0 deps

Validate, parse and format IBANs (ISO 13616 registry for 90 countries, MOD 97-10) with bank/branch/account extraction, SEPA flag and generation, plus BIC/SWIFT (ISO 9362) and ISIN (ISO 6166) checks. Every registry example is verified by its own check digits. Zero-dependency, isomorphic.

npm i @lacspace/iban

Usage

iban.ts
import { parseIban, generateIban, isValidIsin } from "@lacspace/iban";

parseIban("GB82 WEST 1234 5698 7654 32");
// { valid: true, country: "GB", bankCode: "WEST", branchCode: "123456", accountNumber: "98765432", sepa: true, … }
generateIban("DE", "370400440532013000"); // "DE89370400440532013000"
isValidIsin("US0378331005");              // true

Exports 14

parseIbanisValidIbangenerateIbanformatIbanelectronicIbanibanCountriesibanLengthexampleIbanmod97SEPAparseBicisValidBicisValidIsinisinCheckDigit

Keywords

ibaniban-validationbicswiftisinmod97bank-accountsepaiso-13616

More in Global Data Kit

@lacspace/country

ISO 3166-1 countries with alpha-2/alpha-3/numeric codes, names, calling codes, currencies, top-level domains, regions and flag emoji — lookup by any code, name or alias, search, and typed data. Every code and ICU's name for it are cross-checked in the tests. Zero-dependency, isomorphic.

@lacspace/currency

ISO 4217 currencies — codes, numeric codes, minor units asserted against the ISO list (0 for JPY, 3 for BHD, 4 for CLF), names, symbols, fund/special classification and Intl-free formatting for en/de/fr/ch/in locales. Zero-dependency, isomorphic.

@lacspace/tax-id

Validate tax and business identifiers with their real checksums — EU VAT (all 27 + UK/XI), Indian GSTIN and PAN, Australian ABN/ACN/TFN, NZ IRD, Canadian BN, US EIN, Brazilian CPF/CNPJ, Argentine CUIT, Chilean RUT, Mexican RFC, Nepali PAN, Singapore UEN, Korean BRN, Japanese corporate number and more — reporting checksum vs format strength. Zero-dependency, isomorphic.

@lacspace/phone

Parse, validate and format international phone numbers — E.164, national and international formats, country detection from the calling code (shared +1/+44/+7 codes resolved by leading digits), trunk prefixes, extensions, per-country length rules and mobile detection for 80+ countries. Isomorphic.

@lacspace/postal-code

Validate and normalise postal codes for 130 countries — ZIP, postcode, PIN, CEP — with the national spacing and casing (SW1A 1AA, K1A 0B1, 01310-100), and knows which countries have no postal codes. Zero-dependency, isomorphic.