UNPKG

@svta/common-media-library

Version:
22 lines 577 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fromCmcdUrl = fromCmcdUrl; const decodeCmcd_js_1 = require("./decodeCmcd.js"); /** * Decode CMCD data from a url encoded string. * * @param url - The url encoded string to decode. * * @returns The decoded CMCD data. * * @group CMCD * * @beta * * @example * {@includeCode ../../test/cmcd/fromCmcdUrl.test.ts#example} */ function fromCmcdUrl(url) { return (0, decodeCmcd_js_1.decodeCmcd)(decodeURIComponent(url.replace(/^CMCD=/, ''))); } //# sourceMappingURL=fromCmcdUrl.js.map