UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

21 lines (20 loc) 432 B
function getResolvedHostForHttpServer(host) { if (host === false) { return "localhost"; } else if (host === true) { return void 0; } else { return host; } } function stripBase(path, base) { if (path === base) { return "/"; } const baseWithSlash = base.endsWith("/") ? base : base + "/"; return path.replace(RegExp("^" + baseWithSlash), "/"); } export { getResolvedHostForHttpServer, stripBase };