diff options
author | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-11 22:14:39 +0000 |
---|---|---|
committer | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-11 22:14:39 +0000 |
commit | 1b93de84e2bf6a6532bdb03e1ae75e47061a4dca (patch) | |
tree | 8989ce8c6c5bb1d2a748ffe91895fe929c99dd5e /modern/src/common/converter.js | |
parent | efe18c504a834760242937572b369530c552e589 (diff) | |
download | trackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.tar.gz trackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.tar.bz2 trackermap-web-1b93de84e2bf6a6532bdb03e1ae75e47061a4dca.zip |
Fixed linting
Diffstat (limited to 'modern/src/common/converter.js')
-rw-r--r-- | modern/src/common/converter.js | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/modern/src/common/converter.js b/modern/src/common/converter.js index 9cdc6239..d45db5d6 100644 --- a/modern/src/common/converter.js +++ b/modern/src/common/converter.js @@ -1,4 +1,4 @@ -const speedConverter = unit => { +const speedConverter = (unit) => { switch (unit) { case 'kmh': return 1.852; @@ -10,7 +10,7 @@ const speedConverter = unit => { } }; -const distanceConverter = unit => { +const distanceConverter = (unit) => { switch (unit) { case 'mi': return 0.000621371; @@ -19,21 +19,13 @@ const distanceConverter = unit => { case 'km': default: return 0.001; - } -} + } +}; -export const speedFromKnots = (value, unit) => { - return value * speedConverter(unit); -} +export const speedFromKnots = (value, unit) => value * speedConverter(unit); -export const speedToKnots = (value, unit) => { - return value / speedConverter(unit); -} +export const speedToKnots = (value, unit) => value / speedConverter(unit); -export const distanceFromMeters = (value, unit) => { - return value * distanceConverter(unit); -} +export const distanceFromMeters = (value, unit) => value * distanceConverter(unit); -export const distanceToMeters = (value, unit) => { - return value / distanceConverter(unit); -} +export const distanceToMeters = (value, unit) => value / distanceConverter(unit); |