From 82e1ecb9b8e739c61cdf42e1c96eb7b4eb0be0c7 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Thu, 13 Jun 2024 19:00:35 +0200 Subject: [PATCH] chore: tweaks --- src/battery-type.js | 2 ++ src/body-type.js | 2 ++ src/index.js | 2 -- src/model.js | 2 ++ src/motor.js | 2 ++ src/photos.js | 40 ++++++++++++++------------- src/plan-of-manufacture.js | 2 ++ src/restraint-systems.js | 2 ++ src/world-manufacturing-identifier.js | 2 ++ src/year.js | 2 ++ 10 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/battery-type.js b/src/battery-type.js index f3f8564..3bdf139 100644 --- a/src/battery-type.js +++ b/src/battery-type.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = letter => { switch (letter) { case 'F': diff --git a/src/body-type.js b/src/body-type.js index 44563b6..38b49ef 100644 --- a/src/body-type.js +++ b/src/body-type.js @@ -1,3 +1,5 @@ +'use strict' + const S = (letter, year) => { switch (year) { case 2012: diff --git a/src/index.js b/src/index.js index 83e7f0d..681594d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,5 @@ 'use strict' -// TODO: add vin locations photos - const debug = require('debug-logfmt')('tesla-vin') const digit = (input, start, end) => (end ? input.slice(start - 1, end) : input[start - 1]) diff --git a/src/model.js b/src/model.js index 5781e19..6b5086c 100644 --- a/src/model.js +++ b/src/model.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = input => { switch (input) { case 'S': diff --git a/src/motor.js b/src/motor.js index d93d621..cf7643b 100644 --- a/src/motor.js +++ b/src/motor.js @@ -1,3 +1,5 @@ +'use strict' + const S = (letter, year) => { switch (year) { case 2012: diff --git a/src/photos.js b/src/photos.js index 63e3354..2eb2cb2 100644 --- a/src/photos.js +++ b/src/photos.js @@ -1,4 +1,6 @@ -const PREFIX = 'https://teslahunt.github.io/vin/images' +'use strict' + +const BASE_URL = 'https://teslahunt.github.io/vin/images' const S = year => { switch (year) { @@ -6,20 +8,20 @@ const S = year => { case 2013: case 2014: case 2015: - return [`${PREFIX}/S/1.jpeg`, `${PREFIX}/S/2.jpeg`, `${PREFIX}/S/3.jpeg`] + return [`${BASE_URL}/S/1.jpeg`, `${BASE_URL}/S/2.jpeg`, `${BASE_URL}/S/3.jpeg`] case 2016: case 2017: case 2018: case 2019: case 2020: return [ - `${PREFIX}/S/1.jpeg`, - `${PREFIX}/S/2.jpeg`, - `${PREFIX}/S/3.jpeg`, - `${PREFIX}/S/4.jpeg` + `${BASE_URL}/S/1.jpeg`, + `${BASE_URL}/S/2.jpeg`, + `${BASE_URL}/S/3.jpeg`, + `${BASE_URL}/S/4.jpeg` ] default: - return [`${PREFIX}/S/5.jpeg`, `${PREFIX}/S/6.jpeg`, `${PREFIX}/S/7.jpeg`] + return [`${BASE_URL}/S/5.jpeg`, `${BASE_URL}/S/6.jpeg`, `${BASE_URL}/S/7.jpeg`] } } @@ -31,29 +33,29 @@ const X = year => { case 2018: case 2019: case 2020: - return [`${PREFIX}/X/1.jpeg`, `${PREFIX}/X/2.jpeg`, `${PREFIX}/X/3.jpeg`] + return [`${BASE_URL}/X/1.jpeg`, `${BASE_URL}/X/2.jpeg`, `${BASE_URL}/X/3.jpeg`] default: - return [`${PREFIX}/X/4.jpeg`, `${PREFIX}/X/5.jpeg`, `${PREFIX}/X/6.jpeg`] + return [`${BASE_URL}/X/4.jpeg`, `${BASE_URL}/X/5.jpeg`, `${BASE_URL}/X/6.jpeg`] } } const Y = () => { return [ - `${PREFIX}/Y/1.jpeg`, - `${PREFIX}/Y/2.jpeg`, - `${PREFIX}/Y/3.jpeg`, - `${PREFIX}/Y/4.jpeg`, - `${PREFIX}/Y/5.jpeg` + `${BASE_URL}/Y/1.jpeg`, + `${BASE_URL}/Y/2.jpeg`, + `${BASE_URL}/Y/3.jpeg`, + `${BASE_URL}/Y/4.jpeg`, + `${BASE_URL}/Y/5.jpeg` ] } const _3 = () => { return [ - `${PREFIX}/3/1.jpeg`, - `${PREFIX}/3/2.jpeg`, - `${PREFIX}/3/3.jpeg`, - `${PREFIX}/3/4.jpeg`, - `${PREFIX}/3/5.jpeg` + `${BASE_URL}/3/1.jpeg`, + `${BASE_URL}/3/2.jpeg`, + `${BASE_URL}/3/3.jpeg`, + `${BASE_URL}/3/4.jpeg`, + `${BASE_URL}/3/5.jpeg` ] } diff --git a/src/plan-of-manufacture.js b/src/plan-of-manufacture.js index 44caf5d..af8b7c5 100644 --- a/src/plan-of-manufacture.js +++ b/src/plan-of-manufacture.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = letter => { switch (letter) { case 'A': diff --git a/src/restraint-systems.js b/src/restraint-systems.js index 8b7deb0..5fbbc95 100644 --- a/src/restraint-systems.js +++ b/src/restraint-systems.js @@ -1,3 +1,5 @@ +'use strict' + const X = (letter, year) => { switch (year) { case 2016: diff --git a/src/world-manufacturing-identifier.js b/src/world-manufacturing-identifier.js index 4f99ffe..bae997b 100644 --- a/src/world-manufacturing-identifier.js +++ b/src/world-manufacturing-identifier.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = letter => { switch (letter) { case '5YJ': diff --git a/src/year.js b/src/year.js index dcc8f62..07ed96c 100644 --- a/src/year.js +++ b/src/year.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = letter => { switch (letter) { case 'C':