basic-hypertext is a small and simple library that can take a body of text and replace the valid URLs with hypertext formatted URLs.
For example:
This text http://www.example.com
Is transformed into:
This text <a href="http://www.example.com">http://www.example.com</a>
Using code like the following:
import { create } from 'basic-hypertext';
const text = 'Text http://www.example.com';
const transformed = create(text);
Example code can be found in ./example
$ npm i basic-hypertext
$ npm i
$ npm test
$ npm run build
basic-hypertext is released under the MIT license.