|
|
@ -1,9 +1,11 @@ |
|
|
|
import * as currencies from '@dinero.js/currencies'; |
|
|
|
import { getDate, getMonth, getYear, parse, subDays } from 'date-fns'; |
|
|
|
|
|
|
|
import { ghostfolioScraperApiSymbolPrefix } from './config'; |
|
|
|
|
|
|
|
const cryptocurrencies = require('cryptocurrencies'); |
|
|
|
|
|
|
|
|
|
|
|
export const DEMO_USER_ID = '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f'; |
|
|
|
|
|
|
|
export function capitalize(aString: string) { |
|
|
@ -85,12 +87,7 @@ export function isCrypto(aSymbol = '') { |
|
|
|
} |
|
|
|
|
|
|
|
export function isCurrency(aSymbol = '') { |
|
|
|
return ( |
|
|
|
(aSymbol.includes('CHF') || |
|
|
|
aSymbol.includes('EUR') || |
|
|
|
aSymbol.includes('USD')) && |
|
|
|
aSymbol.length >= 6 |
|
|
|
); |
|
|
|
return currencies[aSymbol]; |
|
|
|
} |
|
|
|
|
|
|
|
export function isGhostfolioScraperApiSymbol(aSymbol = '') { |
|
|
|