autolinker
Version:
Utility to automatically link the URLs, email addresses, phone numbers, hashtags, and mentions (Twitter, Instagram) in a given block of text/HTML
11 lines (10 loc) • 454 B
TypeScript
/**
* Determines if the given character can be part of a mention's text characters.
*/
export declare function isMentionTextChar(char: string): boolean;
/**
* Determines if the given `mention` text is valid.
*/
export declare function isValidMention(mention: string, serviceName: MentionService): boolean;
export declare type MentionService = 'twitter' | 'instagram' | 'soundcloud' | 'tiktok';
export declare const mentionServices: MentionService[];