2.0.0 • Published 2 years ago

convert-links v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Convert links

Detect and convert links and email addresses to HTML hyperlinks sanely.

convertLinks("The greatest page in the world is http://www.cwtsite.com I swear!")
// The greatest page in the world is <a href="http://www.cwtsite.com" target="_blank">http://www.cwtsite.com</a> I swear!

Add CSS classes to the link:

convertLinks("http://www.cwtsite.com", ['with-style'])
// <a href="http://www.cwtsite.com" target="_blank" class="with-style">http://www.cwtsite.com</a>

Tests

node test.js