ir-iban
Version:
Turn BBAN into IBAN, validate IBAN for iran banks
13 lines (11 loc) • 340 B
JavaScript
const tokenizeIban = require("./tokenizeIban")
/**
* turns the shomareh hesab into shomareh shaba
* @param {string} iban
* @returns {number} bban or undefined if the iban is not valid
*/
function turnIbanIntoBban(iban = "") {
const { BBAN } = tokenizeIban(iban)
return BBAN ? +BBAN : undefined
}
module.exports = turnIbanIntoBban