UNPKG

@estarlincito/utils

Version:

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

2 lines (1 loc) 246 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./handle-error.cjs"),t=e=>{try{return new URL(e)}catch{return r.handleError(`Invalid URL: ${e}, example: 'https://example.com/'`)}};exports.toURL=t;