feat: max price filtering (#383)

This commit is contained in:
xninjax
2020-10-02 10:59:06 -06:00
committed by GitHub
parent 02f9ed5e53
commit fd294d2baa
22 changed files with 107 additions and 5 deletions
+7
View File
@@ -74,6 +74,13 @@ export const Print = {
return ` ${buildProductString(link, store)} :: IN STOCK, WAITING`;
},
maxPrice(link: Link, store: Store, price: number, color?: boolean): string {
if (color) {
return '✖ ' + buildProductString(link, store, true) + ' :: ' + chalk.yellow(`PRICE ${price} EXCEEDS LIMIT ${Config.store.maxPrice}`);
}
return `${buildProductString(link, store)} :: PRICE ${price} EXCEEDS LIMIT ${Config.store.maxPrice}`;
},
message(message: string, topic: string, store: Store, color?: boolean): string {
if (color) {
return '✖ ' + buildSetupString(topic, store, true) + ' :: ' + chalk.yellow(message);