Links recognition library with FULL unicode support for detecting high-quality link patterns in plain text
Overall
score
97%
Build a simple content validation tool that checks if user-generated text contains any linkifiable patterns (URLs, emails, etc.) and can be used to flag content for moderation.
Create a validation function that:
http://example.com, https://example.com)example.com, www.example.com)user@example.com)ftp://files.example.com)The function should be efficient and handle edge cases like text with no links, empty strings, and text with multiple links.
/**
* Checks if the given text contains any linkifiable patterns
* @param {string} text - The text to check for links
* @returns {boolean} True if text contains at least one link pattern, false otherwise
*/
function hasLinks(text) {
// IMPLEMENTATION HERE
}
module.exports = { hasLinks };@generates
Provides link detection and pattern recognition capabilities.
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