diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-07-10 15:24:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-07-10 15:24:10 -0700 |
commit | 0512964d71a25c172735f2149ef60c3a8b20f683 (patch) | |
tree | f47b42326a7e6a0eaa2715ca8066cb3ca7e7bb90 /modern/src/common/converter.js | |
parent | 627cf95d59f625dcb0544bfd4c067d99dee4bb93 (diff) | |
download | trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.gz trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.tar.bz2 trackermap-web-0512964d71a25c172735f2149ef60c3a8b20f683.zip |
Use modified airbnb eslint
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); |