@osskit/currencies
Advanced tools
+2
-1
| 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 |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"rate.js","sourceRoot":"","sources":["../src/rate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE;IACxD,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,SAAS,GAAG,WAAW,CAAC;AACjC,CAAC,CAAC"} | ||
| {"version":3,"file":"rate.js","sourceRoot":"","sources":["../src/rate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAEpC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE;IACxD,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,GAAG,CAAC,oBAAoB,GAAG,WAAW,CAAC,CAAC;AACnF,CAAC,CAAC"} |
+1
-1
| { | ||
| "name": "@osskit/currencies", | ||
| "version": "1.1.1", | ||
| "version": "1.1.2", | ||
| "repository": { | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/osskit/currencies" |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
197482
0.08%4678
0.02%