Function: fromCmcdQuery()
Call Signature
ts
function fromCmcdQuery(query, options): Cmcd;Defined in: fromCmcdQuery.ts:22
Decode CMCD data from a query string.
Parameters
query
| string | URLSearchParams
The query string to decode.
options
CmcdDecodeOptions & object
Options for decoding.
Returns
The decoded CMCD data.
See
CTA-5004-B Query Argument Definition
Example
ts
const query =
'CMCD=br%3D1000%2Ccom.example-hello%3D%22world%22%2Cec%3D(%22ERR001%22%20%22ERR002%22)%2Csu'
deepEqual(fromCmcdQuery(query), {
br: 1000,
'com.example-hello': 'world',
ec: ['ERR001', 'ERR002'],
su: true,
})Call Signature
ts
function fromCmcdQuery(query, options?): CmcdData;Defined in: fromCmcdQuery.ts:36
Decode CMCD data from a query string.
Parameters
query
| string | URLSearchParams
The query string to decode.
options?
Options for decoding.
Returns
The decoded CMCD data.