UNPKG

@estarlincito/utils

Version:

A collection of utility functions designed to simplify and speed up development tasks in JavaScript and TypeScript projects.

14 lines (13 loc) 232 B
import { throwAppError as t } from "./error-handling.js"; const o = (r) => { try { return new URL(r); } catch { return t( `Invalid URL: ${r}, example: 'https://example.com/'` ); } }; export { o as toURL };