Library to work against complex domain names, subdomains and URIs
82
Build a URL subdomain analyzer that processes a list of URLs and extracts subdomain information from each one.
Your analyzer should:
@generates
/**
* Analyzes a single URL or hostname and extracts subdomain information
*
* @param {string} url - The URL or hostname to analyze
* @returns {Object} Analysis result with { url, subdomain, isValid }
*/
function analyzeSubdomain(url) {
// IMPLEMENTATION HERE
}
/**
* Analyzes multiple URLs or hostnames and extracts subdomain information
*
* @param {string[]} urls - Array of URLs or hostnames to analyze
* @returns {Object[]} Array of analysis results
*/
function analyzeSubdomains(urls) {
// IMPLEMENTATION HERE
}
module.exports = {
analyzeSubdomain,
analyzeSubdomains,
};Provides URL parsing and subdomain extraction capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-tldtsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10