INNER CODE UNIT · TypeScript
ratesNum
aelassas/movinin · packages/currency-converter/index.ts:538
const ratesNum = rates as number / this.currencyAmount
if (this.isRatesCaching) {
this.addRateToRatesCache(currencyPair, ratesNum)
}
return ratesNum
})
}
}
}
convert(currencyAmount?: number) {
if (currencyAmount !== undefined) {
this.amount(currencyAmount)
}
if (this.currencyFrom == '')
throw new Error('currency code cannot be an empty string')