chore: reuse variable

Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
Jef LeCompte
2020-09-26 08:43:50 -04:00
parent 03755d5eb1
commit 24786a443a
+3 -2
View File
@@ -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;
}