@osskit/currencies
Advanced tools
Comparing version 1.1.1 to 1.1.2
import { toMajorUnit } from './conversion.js'; | ||
const JS_BUFFER_MULTIPLIER = 10_000; | ||
export const calculateRate = (from, to) => { | ||
const fromInMajor = toMajorUnit(from); | ||
const toInMajor = toMajorUnit(to); | ||
return toInMajor / fromInMajor; | ||
return (JS_BUFFER_MULTIPLIER * toInMajor) / (JS_BUFFER_MULTIPLIER * fromInMajor); | ||
}; | ||
//# sourceMappingURL=rate.js.map |
{ | ||
"name": "@osskit/currencies", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/osskit/currencies" |
Sorry, the diff of this file is not supported yet
197482
4678