UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

14 lines (13 loc) 562 B
export type TIsStrUrlArgs = Parameters<typeof isStrUrl>; export type TIsStrUrlReturn = ReturnType<typeof isStrUrl>; /** * Heuristically checks if a string looks like a URL or URL pathname. This is a permissive regex-based check and not a full URL validator. * * @param {string} str Source string * @returns {boolean} True if string looks like a URL/pathname * @throws {TypeError} isStrUrl: str must be a string * @example * isStrUrl("www.example.com"); // true * isStrUrl("file.php"); // true */ export declare const isStrUrl: (str: string) => boolean;