Links recognition library with FULL unicode support for detecting high-quality link patterns in plain text
Overall
score
97%
A utility that detects and extracts user mentions (handles) from multilingual text content, supporting international characters and unicode patterns.
@user123 in plain ASCII text and extracts the handle "user123" @test@用户名 (Chinese characters) and extracts the handle "用户名" @test@مستخدم (Arabic characters) and extracts the handle "مستخدم" @test@alice @боб @carlos in mixed script text and extracts all three handles @test@user😀 is valid and extracts "user😀" @test@user hello extracts only "user" @test@user. extracts only "user" (period not included) @test@generates
/**
* Detects user mentions in text with full Unicode support.
* Mentions start with @ followed by one or more unicode letters, numbers, underscores, or emoji.
*
* @param {string} text - The text to scan for mentions
* @returns {Array<{handle: string, url: string, start: number, end: number}>}
* Array of detected mentions with their handles and metadata
*/
function detectMentions(text) {
// IMPLEMENTATION HERE
}
module.exports = { detectMentions };Provides link detection with unicode pattern support for building custom mention schemas.
@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