UNPKG

molstar

Version:

A comprehensive macromolecular library.

27 lines 919 B
/** * 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> */ import { ConsoleLogger } from '../../mol-util/console-logger'; export 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) { ConsoleLogger.error('Config', "Unable to retrieve property " + path.join('.') + " from " + JSON.stringify(params)); } } //# sourceMappingURL=util.js.map