mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
Add definition for "IBAN.js".
This commit is contained in:
Vendored
+58
@@ -0,0 +1,58 @@
|
||||
// Type definitions for iban.js 0.0.5
|
||||
// Project: https://github.com/arhs/iban.js/
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module ARHS {
|
||||
/**
|
||||
* @summary Interface for {@link IBAN} object.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface IBANStatic {
|
||||
/**
|
||||
* @summary Returns the IBAN in a electronic format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in electronic format.
|
||||
*/
|
||||
electronicFormat(iban: string): string;
|
||||
|
||||
/**
|
||||
* @summary Convert the passed BBAN to an IBAN for this country specification.
|
||||
* @param {string} bban The BBAN to convert to IBAN
|
||||
* @returns {string} The IBAN
|
||||
*/
|
||||
fromBBAN(bban: string): string;
|
||||
|
||||
/**
|
||||
* @summary Check if the passed iban is valid according to this specification.
|
||||
* @param {string} iban The iban to validate.
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValid(iban: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Check of the passed BBAN is valid.
|
||||
* @param {string} bban The BBAN to validate
|
||||
* @returns {boolean} True if valid, false otherwise.
|
||||
*/
|
||||
isValidBBAN(bban: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Returns the IBAN in a print format.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string} The IBAN in print format.
|
||||
*/
|
||||
printFormat(iban: string, separator: string[]): string;
|
||||
|
||||
/**
|
||||
* @summary Convert the passed IBAN to a country-specific BBAN.
|
||||
* @param {string} iban The IBAN to convert.
|
||||
* @param {string[]} Separator the separator to use between BBAN blocks.
|
||||
* @returns {string} The BBAN
|
||||
*/
|
||||
toBBAN(iban: string, separator: string[]): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare var IBAN: ARHS.IBANStatic;
|
||||
Reference in New Issue
Block a user