Change a link href in html to where you want
$ npm install --save link-href
var linkHref = require('link-href');
var tack = linkHref(html, function(href, attr) {
// return updated url value if you want to change the href
return href + '/changeurl';
});
console.log(tack.html, tack.link);
HTML string that includes link with google font href
To evaluate a link which could be updated or not
Return updated html with link information
{
html: String
link: []
}
MIT © Jimmy Moon