Skip to main content
Module

x/humanize_url/mod.ts

πŸ”— Humanize a URL in Deno https://yogi.codes β†’ yogi.codes
Latest
File
export async function validURL(str: string): Promise<boolean> { try { new URL(str); } catch (_) { return false; } return true;}
export async function humanizeUrl(url: string) { return url.replace(/^https?:\/\//, '').replace(/\/$/, '');}