Skip to content

combineMetadata

function combineMetadata(metadata, withCDN?): Record<string, string>;

Defined in: packages/synapse-sdk/src/utils/metadata.ts:145

Combines metadata object with withCDN flag, ensuring consistent behavior. If withCDN is true, adds the withCDN key only if not already present. If withCDN is false or undefined, returns metadata unchanged.

ParameterTypeDescription
metadataRecord<string, string>Base metadata object (can be empty)
withCDN?booleanWhether to include CDN flag

Record<string, string>

Combined metadata object