"use strict"; // P A C K A G E S import html from "choo/html"; import { require as local } from "app-root-path"; // V A R I A B L E S const config = local("/config"); let title = ""; // E X P O R T export default (state, emit) => { switch(true) { case (state.route !== "/" && state.params.wildcard): title = `${state.params.wildcard.capitalize()} ∙ LBRY ∙ ${config.meta.tagline}`; break; case (state.route === "api"): title = `API ∙ LBRY ∙ ${config.meta.tagline}`; break; default: title = `LBRY ∙ ${config.meta.tagline}`; break; } if (state.title !== title) emit(state.events.DOMTITLECHANGE, title); state.page = state.page || { }; const newMetadata = state.lbry; return html`