UNPKG

bankcode-bic

Version:

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

34 lines (32 loc) 1.76 kB
import { FieldNameType } from "../download/download.js"; import { DataResult, DataResultKeyed } from "./pack-data.js"; //#region src/libs/query.d.ts /** * Converts field values to an object with the specified fields. * * @param fieldValues - The values of the fields, either as a string or an array of strings. * @param fields - The field names to use as keys in the resulting object. * @returns An object where each key corresponds to a field name and its value is the corresponding value from fieldValues. */ declare const toObject: (fieldValues: string | string[], fields: FieldNameType[]) => Partial<Record<FieldNameType, string>>; /** * Retrieves an object from keyed data based on a key value. * * @param keyValue - The value of the key to look up. * @param data - The keyed data result (must be of type DataResultKeyed). * @returns The object corresponding to the key value, or undefined if not found. * @throws {Error} If the data is not in keyed format. */ declare const keyedGetObject: (keyValue: string, data: DataResultKeyed) => Partial<Record<FieldNameType, string>> | undefined; /** * Retrieves an object from serialized data based on a key and key value. * * @param key - The field name of the key to look up. * @param keyValue - The value of the key to look up. * @param data - The serialized data result (must be of type DataResultSerialized). * @returns The object corresponding to the key value, or undefined if not found. * @throws {Error} If the data is not in serialized format or the key is not found. */ declare const serializedGetObject: (key: string, keyValue: string, data: DataResult) => Partial<Record<FieldNameType, string>> | undefined; //#endregion export { keyedGetObject, serializedGetObject, toObject };