select-link
v1.0.0
Published
Selects any links from the text and returns the link tag with the filled href.
Downloads
3
Readme
select-link
Installation
npm i select-link
or using yarn:
yarn add select-link
Usage
import format from 'select-link';
const text = format(
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, https://google.com sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
);
console.log(text);
// Lorem ipsum dolor sit amet, consectetur adipiscing elit, <a href="https://google.com">https://google.com</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.