Here is the code for the two functions of iban@1.3.0:
https://github.com/arhs/iban.js/blob/master/iban.js#L359
/**
* Convert an IBAN to a BBAN.
*
* @param iban
* @param {String} [separator] the separator to use between the blocks of the BBAN, defaults to ' '
* @returns {string|*}
*/
exports.toBBAN = function(iban, separator){
if (typeof separator == 'undefined'){
separator = ' ';
}
iban = electronicFormat(iban);
var countryStructure = countries[iban.slice(0,2)];
if (!countryStructure) {
throw new Error('No country with code ' + iban.slice(0,2));
}
return countryStructure.toBBAN(iban, separator);
};
exports.printFormat = function(iban, separator){
if (typeof separator == 'undefined'){
separator = ' ';
}
return electronicFormat(iban).replace(EVERY_FOUR_CHARS, "$1" + separator);
};