@progress/kendo-angular-schematics
Version:
Kendo UI Schematics for Angular
29 lines • 1.15 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseComplexOptions = parseComplexOptions;
function parseComplexOptions(props, options) {
return props.reduce((acc, option) => {
if (options[option]) {
try {
const rawValue = `${options[option]}`;
if (rawValue) {
const parsed = JSON.parse(rawValue);
acc[option] = parsed;
}
else {
acc[option] = null;
}
}
catch (e) {
e.message = `Failed parsing '${option}' input. ${e.message}.`;
throw e;
}
}
return acc;
}, {});
}
//# sourceMappingURL=parse-complex-options.js.map