Html prefix
Prefix html template url from selected tags.
Install
npm install html-prefix
Usage
var prefix = ;var html = '<script src="/js/example.js"></script>';var prefixUrl = '//example.com/'; var newHtml = ; console; //=> <script src="//example.com//js/example.js"></script>
otions
prefix
: Url prefix path.
attrs
: Set the selector to prefix path.
You can set a object, like so:
```javascript
{
'link:href': false, // to cancel the selector
'img:data-href': true // to add the selector
}
```
You can set a array, like so:
```javascript
['img:data-href',...] // to add any selector
```
default selector have "img:src", "img:srcset", "img:data-src", "script:src", "link:href"