UNPKG

ibantools-germany

Version:

IBAN Validator and Generator for German Bank Accounts

43 lines (42 loc) 1.25 kB
/** * ibantools-germany * Copyright (c) 2022-2026 Markus Baumer <markus@baumer.dev> * SPDX-License-Identifier: MIT OR MPL-2.0 */ export interface CheckDigits { [method: string]: number[]; } export interface NextCheckDigits { add: CheckDigits; remove: CheckDigits; valid: string; } /** * Returns date object * * @param date Date from string or current date if undefined * @returns */ export declare const dateObject: (date?: string | Date) => Date; /** * Combines current data by adding or removing from data provided in next * @param current * @param nextAdd * @param nextRemove */ export declare const combineCurrentNext: (current: CheckDigits, nextAdd: CheckDigits, nextRemove: CheckDigits) => CheckDigits; /** * Get data, either current or combined with next by comparing it to valid-to * date from next data * @param date * @returns */ export declare const checkDigitData: (date?: string | Date) => CheckDigits; /** * Get the check digit method assigned for a BLZ * * @param blz German BLZ with 8 digits * @param date Method valid at this date (default: current date) * @returns Check digit method or null if invalid */ export declare const methodForBLZ: (blz: string, date?: string | Date) => string | null;