MCPcopy
hub / github.com/apache/echarts / get

Function get

src/preprocessor/backwardCompat.ts:29–39  ·  view source on GitHub ↗
(opt: Dictionary<any>, path: string)

Source from the content-addressed store, hash-verified

27import { deprecateLog, deprecateReplaceLog } from '../util/log';
28
29function get(opt: Dictionary<any>, path: string): any {
30 const pathArr = path.split(',');
31 let obj = opt;
32 for (let i = 0; i < pathArr.length; i++) {
33 obj = obj && obj[pathArr[i]];
34 if (obj == null) {
35 break;
36 }
37 }
38 return obj;
39}
40
41function set(opt: Dictionary<any>, path: string, val: any, overwrite?: boolean) {
42 const pathArr = path.split(',');

Callers 1

globalBackwardCompatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected