fix: rateLimitTimeout not being defaulted (#106)

refactor: `browser` and `store` config object
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
Jef LeCompte
2020-09-20 11:02:57 -04:00
committed by GitHub
parent 3de1f81eb1
commit 28947be9bc
4 changed files with 21 additions and 24 deletions
+3 -3
View File
@@ -12,11 +12,11 @@ import {includesLabels} from './includes-labels';
* @param brand The brand of the GPU
*/
function filterBrand(brand: string) {
if (Config.showOnlyBrands.length === 0) {
if (Config.store.showOnlyBrands.length === 0) {
return true;
}
return Config.showOnlyBrands.includes(brand);
return Config.store.showOnlyBrands.includes(brand);
}
/**
@@ -70,7 +70,7 @@ export async function lookup(browser: Browser, store: Store) {
const givenUrl = link.cartUrl ? link.cartUrl : link.url;
if (Config.openBrowser) {
if (Config.browser.open) {
await open(givenUrl);
}
+1 -2
View File
@@ -1,4 +1,3 @@
import {Amazon} from './amazon';
import {AmazonCa} from './amazon-ca';
import {Asus} from './asus';
@@ -25,7 +24,7 @@ const masterList = new Map([
const list = new Map();
for (const name of Config.stores) {
for (const name of Config.store.stores) {
list.set(name, masterList.get(name));
}