blob: 437351621da0c8b6e6e34ed5779f00a2b9db927d (
plain)
1
2
3
4
5
6
7
8
9
|
// @flow
export const formatAccount = (val: string): string => {
// display number altogether when longer than 12
if (val.length > 12) {
return val;
}
// display quartets
return val.replace(/([0-9]{4})/g, '$1 ').trim();
};
|