@cranberry-money/shared-utils
Version:
Shared utility functions for Blueberry platform
26 lines • 782 B
JavaScript
const SOURCE_OF_FUNDS_LABELS = {
employment_income: 'Employment income',
savings: 'Savings',
investment_income: 'Investment income',
sale_of_assets: 'Sale of assets',
inheritance: 'Inheritance',
gift: 'Gift',
other: 'Other',
};
const INTENDED_USE_LABELS = {
long_term_investment: 'Long-term investment',
trading_crypto: 'Trading crypto currencies',
savings: 'Savings',
other: 'Other',
};
export function formatSourceOfFunds(funds) {
if (!funds || funds.length === 0)
return '';
return funds.map((fund) => SOURCE_OF_FUNDS_LABELS[fund] || fund).join(', ');
}
export function formatIntendedUse(use) {
if (!use)
return '';
return INTENDED_USE_LABELS[use] || use;
}
//# sourceMappingURL=formatting-labels.js.map