An open API service indexing awesome lists of open source software.

https://github.com/acinader/link-painter

Add Query Parameters to Links in HTML
https://github.com/acinader/link-painter

filter google-analytics library nodejs query-string querystring sindresorhus stream stream-filter url

Last synced: 3 months ago
JSON representation

Add Query Parameters to Links in HTML

Awesome Lists containing this project

README

        

# link-painter [![Build Status](https://travis-ci.org/acinader/link-painter.svg?branch=master)](https://travis-ci.org/acinader/link-painter)
Add Query Parameters to Links in HTML

### install
`npm install link-painter`

### example
```js
const queryParams = {
utm_source: 'newsletter',
utm_medium: 'link',
utm_campaign: 'link-painter'
};

const html = fs.createReadStream('./sample.html', 'utf-8');
const result = await getStream(html.pipe(new LinkPainter('my.example.com', queryParams)));
```

yields:

```html



click me

or me

```