molstar
Version:
A comprehensive macromolecular library.
31 lines • 1.07 kB
JavaScript
/**
* Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParam = void 0;
var console_logger_1 = require("../../mol-util/console-logger");
function getParam(params) {
var path = [];
for (var _i = 1; _i < arguments.length; _i++) {
path[_i - 1] = arguments[_i];
}
try {
var current = params;
for (var _a = 0, path_1 = path; _a < path_1.length; _a++) {
var p = path_1[_a];
if (typeof current === 'undefined')
return;
current = current[p];
}
return current;
}
catch (e) {
console_logger_1.ConsoleLogger.error('Config', "Unable to retrieve property " + path.join('.') + " from " + JSON.stringify(params));
}
}
exports.getParam = getParam;
//# sourceMappingURL=util.js.map
;