Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const addQueryParameter = (url, additionalParameters = {}) => {
const parser = document.createElement('a')
parser.href = url
const existingParameters = queryString.parse(parser.search)
parser.search = queryString.stringify(Object.assign({}, existingParameters, additionalParameters))
return parser.href
}
export const addQueryParameter = (url, additionalParameters = {}) => {
const parser = document.createElement('a')
parser.href = url
const existingParameters = queryString.parse(parser.search)
parser.search = queryString.stringify(Object.assign({}, existingParameters, additionalParameters))
return parser.href
}