UNPKG

@svta/common-media-library

Version:
27 lines 778 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.encodeCmcd = encodeCmcd; const encodeSfDict_js_1 = require("../structuredfield/encodeSfDict.js"); const prepareCmcdData_js_1 = require("./prepareCmcdData.js"); /** * Encode a CMCD object to a string. * * @param cmcd - The CMCD object to encode. * @param options - Options for encoding. * * @returns The encoded CMCD string. * * @group CMCD * * @beta * * @example * {@includeCode ../../test/cmcd/encodeCmcd.test.ts#example} */ function encodeCmcd(cmcd, options = {}) { if (!cmcd) { return ''; } return (0, encodeSfDict_js_1.encodeSfDict)((0, prepareCmcdData_js_1.prepareCmcdData)(cmcd, options), { whitespace: false }); } //# sourceMappingURL=encodeCmcd.js.map