You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
751 B

3 years ago
let {course, category, cuisine, ingredient, dateadded, theme, isfavourite, rating, cookingtime} = input;
const iArray = [course, category, cuisine, ingredient, dateadded, theme, isfavourite, rating, cookingtime];
const dArray = ["course", "category", "cuisine", "ingredient", "dateadded", "theme", "is favourite", "rating", "cooking time"];
let TempS = ""
for (let i = 0; i < iArray.length; i++) {
if (Boolean(iArray[i])) {
if (TempS == "") {
TempS = dArray[i] + ": " + "<b>" + iArray[i] + "</b>"
} else {
TempS = TempS + "\n• " + dArray[i] + ": " + "<b>" + iArray[i] + "</b>"
}
if (dArray[i].search(new RegExp("time", "i")) > -1) {
TempS = TempS + " <b>min</b>"
}
}
}
dv.el('t', "<b>🔎 search terms:</b> \n• " + TempS);