UNPKG

@estarlincito/utils

Version:

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

12 lines (11 loc) 217 B
import { handleError as t } from "./handle-error.mjs"; const o = (r) => { try { return new URL(r); } catch { return t(`Invalid URL: ${r}, example: 'https://example.com/'`); } }; export { o as toURL };