UNPKG

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) 466 B
/** * Determines if the given `char` is a an allowed character in a hashtag. These * are underscores or any alphanumeric char. */ export declare function isHashtagTextChar(charCode: number): boolean; /** * Determines if a hashtag match is valid. */ export declare function isValidHashtag(hashtag: string): boolean; export type HashtagService = 'twitter' | 'facebook' | 'instagram' | 'tiktok' | 'youtube'; export declare const hashtagServices: HashtagService[];