Append CMCD query args to a URL.
The URL to append to.
The CMCD object to append.
Optional
Options for encoding the CMCD object.
The URL with the CMCD query args appended.
const url = 'https://test.com'const data = { br: 1000,}equal(appendCmcdQuery(url, data), `${url}?CMCD=br%3D1000`)equal(appendCmcdQuery(`${url}?hello=world`, data), `${url}?hello=world&CMCD=br%3D1000`) Copy
const url = 'https://test.com'const data = { br: 1000,}equal(appendCmcdQuery(url, data), `${url}?CMCD=br%3D1000`)equal(appendCmcdQuery(`${url}?hello=world`, data), `${url}?hello=world&CMCD=br%3D1000`)
Append CMCD query args to a URL.