mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 15:07:33 +08:00
22 lines
549 B
JavaScript
22 lines
549 B
JavaScript
const exchangeRatesLocalStorageKey = 'lab_exchange_rates';
|
|
|
|
function getExchangeRates() {
|
|
const storageData = localStorage.getItem(exchangeRatesLocalStorageKey) || '{}';
|
|
return JSON.parse(storageData);
|
|
}
|
|
|
|
function setExchangeRates(value) {
|
|
const storageData = JSON.stringify(value);
|
|
localStorage.setItem(exchangeRatesLocalStorageKey, storageData);
|
|
}
|
|
|
|
function clearExchangeRates() {
|
|
localStorage.removeItem(exchangeRatesLocalStorageKey);
|
|
}
|
|
|
|
export default {
|
|
getExchangeRates,
|
|
setExchangeRates,
|
|
clearExchangeRates,
|
|
};
|