@xapp/arachne-utils
Version:
11 lines (10 loc) • 439 B
TypeScript
/*! Copyright (c) 2024, XAPP AI */
/**
* Determines if the provided URL has a certain file extension. This is useful to filter out undesirable URLs to follow such as .pdf, .jpg, .png or other file types that don't have hyperlinks themselves.
*
* It assumes that a URL without an extension is HTML.
*
* @param url
* @param extension
*/
export declare function hasExtension(url: string | URL, extension: string | string[]): boolean;