UNPKG

piral-cli

Version:

The standard CLI for creating and building a Piral instance or a Pilet.

16 lines (12 loc) 211 B
export function normalizePublicUrl(url: string) { if (!url) { return '/'; } if (!url.endsWith('/')) { url = `${url}/`; } if (!url.startsWith('/')) { url = `/${url}`; } return url; }