Function: decodeCmcd()
Call Signature
ts
function decodeCmcd(cmcd, options): Cmcd;Defined in: decodeCmcd.ts:55
Decode a CMCD string to an object.
Parameters
cmcd
string
The CMCD string to decode.
options
CmcdDecodeOptions & object
Options for decoding.
Returns
The decoded CMCD object.
See
Example
ts
deepEqual(decodeCmcd('br=(1000),com.example-hello="world",ec=("ERR001" "ERR002"),su,v=2'), {
br: [1000],
'com.example-hello': 'world',
ec: ['ERR001', 'ERR002'],
su: true,
v: 2,
})Call Signature
ts
function decodeCmcd<T>(cmcd, options?): T;Defined in: decodeCmcd.ts:70
Decode a CMCD string to an object.
Type Parameters
T
The type of the decoded object. Defaults to CmcdData.
Parameters
cmcd
string
The CMCD string to decode.
options?
Options for decoding.
Returns
T
The decoded CMCD object.