import parser from 'anchorme' ; export function parseURL ( text ) { const lib = ( parser as any as { default : typeof parser ; } ) . default || parser ; return lib . list ( text ) . map ( ( x ) => x . string ) . filter ( ( y ) => { try { new URL ( y ) ; return true ; } catch { return false ; } } ) ; }