autolinker
Version:
Utility to automatically link the URLs, email addresses, phone numbers, hashtags, and mentions (Twitter, Instagram) in a given block of text/HTML
12 lines (11 loc) • 458 B
TypeScript
/**
* Determines if the given `char` is a an allowed character in a hashtag. These
* are underscores or any alphanumeric char.
*/
export declare function isHashtagTextChar(char: string): boolean;
/**
* Determines if a hashtag match is valid.
*/
export declare function isValidHashtag(hashtag: string): boolean;
export declare type HashtagService = 'twitter' | 'facebook' | 'instagram' | 'tiktok';
export declare const hashtagServices: HashtagService[];