Given a user-entered URL, add your own affiliate code to the querystring.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
index.js
package.json
readme.md
test.js

readme.md

Doesn't throw errors on bad urls (just returns them without modification)

Will only apply changes on the domain/host you specify.

Usage

var createAdderFunction = require('./')
var addAffiliateCode = createAdderFunction('shoppingsite.com', 'code', 'my-money-making-code')

addAffiliateCode('http://shoppingsite.com/thing') // => 'http://shoppingsite.com/thing?code=my-money-making-code'

addAffiliateCode('http://google.com/thing') // => 'http://google.com/thing'

License

WTFPL