import html from '../utils/html.js' const formatURL = url => url.replace(/^(https?:|)\/\//, '').replace(/\/$/, '') export default function Link(url, name) { return name ? (url ? html`${name}` : name) : url && html`${formatURL(url)}` }