@exodus/currency
Advanced tools
Comparing version 5.0.2 to 6.0.0
{ | ||
"name": "@exodus/currency", | ||
"version": "5.0.2", | ||
"version": "6.0.0", | ||
"description": "Currency support.", | ||
@@ -9,5 +9,6 @@ "type": "module", | ||
"license": "UNLICENSED", | ||
"homepage": "https://github.com/ExodusMovement/exodus-core/tree/master/packages/currency#readme", | ||
"homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/libraries/currency", | ||
"files": [ | ||
"src", | ||
"CHANGELOG.md", | ||
"!**/__tests__/**" | ||
@@ -25,3 +26,3 @@ ], | ||
"test": "run -T exodus-test --jest '**/__tests__/**/?(*.)+(spec|test).(t|j)s?(x)'", | ||
"lint": "run -T eslint . --ignore-path ../../.gitignore", | ||
"lint": "run -T eslint .", | ||
"lint:fix": "yarn lint --fix" | ||
@@ -31,8 +32,8 @@ }, | ||
"type": "git", | ||
"url": "git+https://github.com/ExodusMovement/exodus-core.git" | ||
"url": "git+https://github.com/ExodusMovement/exodus-hydra.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ExodusMovement/exodus-core/issues?q=is%3Aissue+is%3Aopen+label%3Acurrency" | ||
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Acurrency" | ||
}, | ||
"gitHead": "f5906d21aa52794b881bac338655f838bc4f3e68" | ||
"gitHead": "a234415246bb537f2ed5106945cb2b63b8e21fb8" | ||
} |
@@ -15,3 +15,3 @@ declare module '@exodus/currency' { | ||
function isNumberUnit(param: unknown): boolean | ||
function isNumberUnit(param: unknown): param is NumberUnit | ||
@@ -18,0 +18,0 @@ class NumberUnit { |
@@ -95,3 +95,3 @@ import deprecationWarning from './deprecation-warning.js' | ||
// verify that there no extra symbols, only `0-9` and one `.` allowed | ||
if (!/^\d*\.?\d*$/.test(num)) { | ||
if (!/^\d*(\.\d*)?$/.test(num)) { | ||
throw new Error(`Not allowed symbol in number: ${num}`) | ||
@@ -98,0 +98,0 @@ } |
@@ -6,3 +6,3 @@ import assert from 'minimalistic-assert' | ||
const { isEmpty, mapValues, memoize } = lodash | ||
const { isEmpty, mapValues, memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils | ||
@@ -55,3 +55,2 @@ const FACTORY_SYMBOL = Symbol('UnitType') | ||
// eslint-disable-next-line unicorn/prefer-object-from-entries | ||
this.defaultUnit = Object.values(this.units).reduce((maxUnit, unit) => { | ||
@@ -58,0 +57,0 @@ return Math.trunc(maxUnit.power) > unit.power ? maxUnit : unit |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
60628
15
823