UNPKG

bankcode-bic

Version:

Convert bank codes from IBAN to BICs, Name of bank. Currently supports only some selected EU countries.

20 lines (19 loc) 888 B
import { FieldNameType } from "../download/download.js"; import { DataResult } from "./pack-data.js"; //#region src/libs/fetch-data.d.ts type fetchDataOptions = { keyNames?: FieldNameType[]; fieldNames?: FieldNameType[]; fetchFn?: typeof globalThis.fetch; }; /** * Fetches bank data for a specified country and packs it into a structured format. * * @param country - The country code for which to fetch bank data. * @param options - Optional parameters including key names, field names, and a custom fetch function. * @returns A promise that resolves to a packed data object containing bank information. * @throws {Error} If the download URL is not found, if the data fails to download, if parsing fails, or if packing fails. */ declare function fetchData(country: string, options: fetchDataOptions): Promise<DataResult>; //#endregion export { fetchData, fetchDataOptions };