UNPKG

@rashedmakkouk/dev-utils

Version:
19 lines (18 loc) 508 B
/** Utilities */ import { AutolinkerConfig, Match } from 'autolinker'; /** * Parses a text string and returns links matching: * * - Hashtag **#** * - Mention **\@** * - URL **http** * * @returns Result object: * - Object.links: Array of unique words links (e.g. mention, hashtag, url). * - Object.matches: Array of all matched links metadata. */ declare function autolinks(text?: string | null, options?: AutolinkerConfig): { links: string[]; matches: Match[]; }; export default autolinks;