Skip to content

Commit

Permalink
chore: reuse variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
  • Loading branch information
jef committed Sep 26, 2020
1 parent 03755d5 commit 24786a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ export const Print = {
return `✖ ${buildProductString(link, store)} :: CAPTCHA`;
},
inStock(link: Link, store: Store, color?: boolean, sms?: boolean): string {
const productString = `${buildProductString(link, store)} :: IN STOCK`;

if (color) {
return chalk.bgGreen.white.bold(`🚀🚨 ${buildProductString(link, store, false)} :: IN STOCK 🚨🚀`);
return chalk.bgGreen.white.bold(`🚀🚨 ${productString} 🚨🚀`);
}

const productString = `${buildProductString(link, store)} :: IN STOCK`;
if (sms) {
return productString;
}
Expand Down

0 comments on commit 24786a4

Please sign in to comment.