UNPKG

@vite-pwa/assets-generator

Version:
15 lines (12 loc) 587 B
'use strict'; function generateHtmlMarkup(instruction) { const apple = Array.from(Object.values(instruction.apple)); const favicon = Array.from(Object.values(instruction.favicon)); const appleSplashScreen = Array.from(Object.values(instruction.appleSplashScreen)); const links = []; favicon.forEach((icon) => icon.link?.length && links.push(icon.link)); apple.forEach((icon) => icon.link?.length && links.push(icon.link)); appleSplashScreen.forEach((icon) => icon.link?.length && links.push(icon.link)); return links; } exports.generateHtmlMarkup = generateHtmlMarkup;