From f89c964321f34f0fe5c8139baab96cd373fd88c0 Mon Sep 17 00:00:00 2001 From: kale-io Date: Mon, 17 Dec 2018 19:35:25 +0000 Subject: [PATCH 1/2] Remove return in single expression arrow functions For arrow function, replaces curly braces and return statement with a direct value or expression when possible. --- src/conversions/lms.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conversions/lms.js b/src/conversions/lms.js index e7bc05b..e97a6e9 100644 --- a/src/conversions/lms.js +++ b/src/conversions/lms.js @@ -8,9 +8,7 @@ export default { const Mbi = getTransform('INVERSE_BRADFORD') const resultArray = Mbi.map((m) => { - return valueArray.reduce((acc, v, key) => { - return (m[key] * v) + acc - }, 0) + return valueArray.reduce((acc, v, key) => (m[key] * v) + acc, 0) }) return { From 3a0000bde16bb4a4affa3d52fd15c9e6350ea5e1 Mon Sep 17 00:00:00 2001 From: kale-io Date: Mon, 17 Dec 2018 19:36:03 +0000 Subject: [PATCH 2/2] Remove return in single expression arrow functions For arrow function, replaces curly braces and return statement with a direct value or expression when possible. --- src/conversions/XYZ.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conversions/XYZ.js b/src/conversions/XYZ.js index e3a9913..5d09bb5 100644 --- a/src/conversions/XYZ.js +++ b/src/conversions/XYZ.js @@ -40,9 +40,7 @@ export default { let Mb = getTransform('BRADFORD') let resultArray = Mb.map((m) => { - return valueArray.reduce((acc, v, key) => { - return (m[key] * v) + acc - }, 0) + return valueArray.reduce((acc, v, key) => (m[key] * v) + acc, 0) }) return {