Links recognition library with FULL unicode support for detecting high-quality link patterns in plain text
Overall
score
97%
Build a URL protocol analyzer that extracts and categorizes links from text based on their protocol types.
Create a tool that processes text input and identifies all URLs with explicit protocol prefixes (HTTP, HTTPS, and FTP). The tool should categorize discovered URLs by their protocol type and provide detailed information about each detected link.
Your tool should accept text input and scan it for URLs that have explicit protocol prefixes. Only URLs beginning with http://, https://, or ftp:// should be detected.
The tool must categorize detected URLs into three distinct groups:
http://)https://)ftp://)For each detected URL, provide:
@generates
/**
* Analyzes text and extracts URLs with explicit HTTP, HTTPS, or FTP protocols.
*
* @param {string} text - The input text to analyze
* @returns {Object} An object containing categorized URLs by protocol type
* @returns {Array} returns.http - Array of HTTP URLs with metadata
* @returns {Array} returns.https - Array of HTTPS URLs with metadata
* @returns {Array} returns.ftp - Array of FTP URLs with metadata
*
* Each URL entry contains: { url, index, lastIndex, protocol }
*/
function analyzeProtocols(text) {
// Implementation here
}
module.exports = { analyzeProtocols };Provides URL detection and link recognition capabilities with protocol identification.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-linkify-itdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10