From cf0e959fb443db4d59d2ba3c0ad13449a1339581 Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Sat, 19 Sep 2020 17:43:53 -0400 Subject: [PATCH] refactor: store naming and map reference Signed-off-by: Jef LeCompte --- README.md | 1 + src/store/model/amazon-ca.ts | 2 +- src/store/model/index.ts | 16 ++++++++-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fb02167..0b994b6 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Here is a list of variables that you can use to customize your newly copied `.en | **Stores** | **Environment variable** | |:---:|:---:| | Best Buy | `bestbuy`| +| Amazon.ca | `amazon-ca`| | Amazon | `amazon`| | B&H | `bandh`| | EVGA | `evga`| diff --git a/src/store/model/amazon-ca.ts b/src/store/model/amazon-ca.ts index 7b4eb01..de1f0f7 100644 --- a/src/store/model/amazon-ca.ts +++ b/src/store/model/amazon-ca.ts @@ -80,5 +80,5 @@ export const AmazonCa: Store = { captchaLabels: ['enter the characters you see below'] } ], - name: 'amazonCa' + name: 'amazon-ca' }; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index b36f697..d3a551d 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -9,14 +9,14 @@ import {Nvidia} from './nvidia'; import {AmazonCa} from './amazon-ca'; const masterList = new Map([ - ['amazon', Amazon], - ['amazonca', AmazonCa], - ['bestbuy', BestBuy], - ['bandh', BAndH], - ['evga', Evga], - ['microcenter', MicroCenter], - ['newegg', NewEgg], - ['nvidia', Nvidia] + [Amazon.name, Amazon], + [AmazonCa.name, AmazonCa], + [BestBuy.name, BestBuy], + [BAndH.name, BAndH], + [Evga.name, Evga], + [MicroCenter.name, MicroCenter], + [NewEgg.name, NewEgg], + [Nvidia.name, Nvidia] ]); const list = new Map();