UNPKG

@sealingp/tesla-vin

Version:

Tesla Vehicle Identification Number (VIN) decoder fork with updates and maintenance

127 lines (121 loc) 3.14 kB
'use strict' const S = (letter, year) => { switch (year) { case 2012: case 2013: switch (letter) { case 'C': return 'Base A/C Motor, Tier 2 battery (31-40 kWh)' case 'G': return 'Base A/C Motor, Tier 4 battery (51-60 kWh)' case 'N': return 'Base A/C Motor, Tier 7 battery (81-90 kWh)' case 'P': return 'Performance A/C Motor, Tier 7 battery (81-90 kWh)' default: return null } case 2014: switch (letter) { case '1': return 'Single Motor (RWD) - Three Phase A/C Induction' case '2': return 'Dual Motor (AWD)s -Three Phase A/C Induction' default: return null } case 2015: case 2016: case 2017: case 2018: switch (letter) { case '1': return 'Single Motor (RWD) -Three Phase A/C Induction - Large Base' case '2': return 'Three Phase A/C Induction - Small Base + Small Base' case '3': return 'Single Motor (RWD) -Three Phase A/C Induction - Large Performance' case '4': return 'Dual Motor (AWD)s -Three Phase A/C Induction - Small Base + Large Performance' default: return null } case 2019: case 2020: case 2021: switch (letter) { case '1': return 'Single Motor (RWD) - Standard' case '2': return 'Dual Motor (AWD) - Standard' case '3': return 'Single Motor (RWD) - Performance' case '4': return 'Dual Motor (AWD) - Performance' default: return null } default: switch (letter) { case '5': return 'Dual Motor (AWD)' case '6': return 'Triple Motor' default: return null } } } const X = letter => { switch (letter) { case '2': return 'Dual Motor (AWD) (standard)' case '4': return 'Dual Motor (AWD) (performance)' case '5': return 'Dual Motor (AWD)' case '6': return 'Triple Motor' default: return null } } const Y = letter => { switch (letter) { case 'D': return 'Single Motor (RWD) Standard' case 'E': return 'Dual Motor (AWD) Standard' case 'F': return 'Dual Motor (AWD) Performance (3DU 800A)' case 'J': return 'Single Motor (RWD) Standard' case 'K': return 'Dual Motor (AWD) Standard' case 'L': return 'Dual Motor (AWD) Performance' case 'R': return 'Single Motor (RWD) Standard (3DU 600A)' case 'S': return 'Single Motor (RWD) Standard (DUB 600A)' default: return null } } const _3 = letter => { switch (letter) { case 'A': return 'Single Motor (RWD) Standard (3DU 800A)' case 'B': return 'Dual Motor (AWD) Standard' case 'C': return 'Dual Motor (AWD) Performance' case 'R': return 'Single Motor (RWD) Standard (3DU 600A)' case 'S': return 'Single Motor (RWD) Standard (DUB 600A)' default: return null } } module.exports = { S, 3: _3, X, Y }