BREAKING CHANGE: update to latest major versions of lit, autosize, awesome-phonenumber & ibantools - fix(validation-messages): get correct validation min and max dates in French (#2163) - feat(ui): update to lit version 3 and update lion prod dependencies, and create an alpha release --------- Co-authored-by: gerjanvangeest <gerjanvangeest@users.noreply.github.com>
16 lines
410 B
JavaScript
16 lines
410 B
JavaScript
import { friendlyFormatIBAN } from 'ibantools';
|
|
|
|
/**
|
|
* Takes an unformatted IBAN and returns a formatted one.
|
|
*
|
|
* @param {string} modelValue value to be formatted
|
|
* @return {string} formatted value
|
|
*/
|
|
export function formatIBAN(modelValue) {
|
|
// defensive code because of ibantools
|
|
if (!modelValue) {
|
|
return '';
|
|
}
|
|
// @ts-ignore should not return null
|
|
return friendlyFormatIBAN(modelValue);
|
|
}
|