pwaOf
The PWA an app has: its namespace's pwa (reminders.pwa for reminders.App), the web app manifest as an object,
if there is one.
export function pwaOf( cb: { lookup(target: string): string[]; lookupOne(target: string, prefer?: "type" | "value"): string; }, appName: string, ): string | undefined { const at = appName.lastIndexOf("."); const name = at < 0 ? "pwa" : `${appName.slice(0, at)}.pwa`; if (name === appName || !cb.lookup(name).length) return undefined; return cb.lookupOne(name, "value"); }