UNPKG

recipez

Version:

Import recipes from cooking sites to your cookbook

23 lines (17 loc) 513 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.recipeTemplate = void 0; const recipeTemplate = recipe => { return ` # ${recipe.name} ${recipe.description} ## Ingredients ${recipe.recipeIngredient.map(ingredient => `- ${ingredient}`).join('\n')} ## Instructions ${recipe.recipeInstructions.map((instruction, i) => `${i + 1}. ${instruction.text}`).join('\n')} *Imported from ${recipe.url || recipe.mainEntityOfPage}* `; }; exports.recipeTemplate = recipeTemplate;