From 7a431062aa79ac9c9524638e60cb4b06323ea697 Mon Sep 17 00:00:00 2001 From: Ashutosh Bishnoi Date: Sat, 28 Nov 2020 13:23:13 +0530 Subject: Chart report code improvements and refactoring --- modern/src/common/converter.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'modern/src/common') diff --git a/modern/src/common/converter.js b/modern/src/common/converter.js index 8fdb4b86..e48b0760 100644 --- a/modern/src/common/converter.js +++ b/modern/src/common/converter.js @@ -1,4 +1,4 @@ -const speedConverter = (value, unit) => { +export const speedConverter = (value, unit) => { let factor; switch (unit) { case 'kmh': @@ -11,14 +11,3 @@ const speedConverter = (value, unit) => { } return (value * factor).toFixed(2); }; - -export const getConverter = (key) => { - switch (key) { - case 'speed': - return speedConverter; - default: - return function (value) { - return value; - } - } -}; \ No newline at end of file -- cgit v1.2.3