Skip to main content

Username Intelligence

Zero-dependency JavaScript library for advanced username analysis. Analyze, classify, score, and detect security issues in usernames with a simple API.

Features

  • Unicode Script Detection — Identify scripts from 100+ languages (Latin, Cyrillic, Arabic, Hangul, Devanagari, Han, etc.) using Unicode property escapes.
  • Spoofing Prevention — Detect homoglyph attacks, invisible characters, confusable characters, RTL overrides, and normalization confusion.
  • Bot & Spam Detection — Shannon entropy analysis, keyboard walk detection, bigram analysis, and UUID/hash-like pattern detection.
  • Smart Classification — Categorize usernames into styles: Personal, Gamer, Corporate, Bot, Leet, Impersonation, Professional, and more.
  • Quality Scoring — 0–100 scores for overall quality, readability, security risk, suspicion, authenticity, and professionalism with human-readable levels.
  • Leet Speak Normalization — Convert h4ck3r to hacker, strip mathematical fonts, normalize advanced leet patterns.
  • Content Moderation — Built-in profanity detection, toxic phrases, hate speech, sexual content, drug references, and violence references.
  • Brand Protection — Check 200+ known brands with Levenshtein similarity to detect impersonation (e.g., раураl with Cyrillic chars).
  • Structural & Linguistic Analysis — Character runs, vowel/consonant ratios, symmetry, palindrome detection, word-likeness, name-likeness, pronounceability, and more.
  • Visual Analysis — Readability, aesthetics, visual balance, distinctiveness, and density scoring.
  • Batch Analysis — Analyze hundreds of usernames with a single call.
  • LRU Cache — Built-in cache (max 500 entries) for repeated analysis of the same input.

Use Cases

  • User Registration — Validate and score usernames during signup.
  • Moderation Tools — Detect bots, spam, and impersonation attempts.
  • Brand Protection — Monitor for phishing usernames targeting your brand.
  • UX Gamification — Score usernames for quality and creativity.
  • Security Auditing — Identify suspicious or malicious username patterns.

Quick Example

import { analyzeUsername } from '@fazelstudio/username-intelligence';

const result = analyzeUsername('h4ck3r_man');
console.log(result.classification.style);
// Output: "personal"

console.log(result.classification.scores.overall);
// Output: 85 (out of 100)