autolinker
Version:
Utility to automatically link the URLs, email addresses, phone numbers, hashtags, and mentions (Twitter, Instagram) in a given block of text/HTML
8 lines (7 loc) • 401 B
TypeScript
import { EmailMatch } from './email-match';
import { HashtagMatch } from './hashtag-match';
import { MentionMatch } from './mention-match';
import { PhoneMatch } from './phone-match';
import { UrlMatch } from './url-match';
export declare type Match = EmailMatch | HashtagMatch | MentionMatch | PhoneMatch | UrlMatch;
export declare type MatchType = 'email' | 'hashtag' | 'mention' | 'phone' | 'url';