1.0.1 • Published 4 years ago

thlinkify v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Function that converts links in text to html links

Example:

// FROM: 
// Какой хороший день https://medium.com/keep-network-korea-привет-ё. Лучший день
// TO:
// Какой хороший день <a href="https://medium.com/keep-network-korea-%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82-%D1%91" target="_blank">https://medium.com/keep-network-korea-привет-ё</a>. Лучший день
import thlinkify from 'thlinkify';

console.log(thlinkify('Какой хороший день https://medium.com/keep-network-korea-привет-ё. Лучший день'))