(opt: Dictionary<any>, path: string, val: any, overwrite?: boolean)
| 39 | } |
| 40 | |
| 41 | function set(opt: Dictionary<any>, path: string, val: any, overwrite?: boolean) { |
| 42 | const pathArr = path.split(','); |
| 43 | let obj = opt; |
| 44 | let key; |
| 45 | let i = 0; |
| 46 | for (; i < pathArr.length - 1; i++) { |
| 47 | key = pathArr[i]; |
| 48 | if (obj[key] == null) { |
| 49 | obj[key] = {}; |
| 50 | } |
| 51 | obj = obj[key]; |
| 52 | } |
| 53 | if (overwrite || obj[pathArr[i]] == null) { |
| 54 | obj[pathArr[i]] = val; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | function compatLayoutProperties(option: Dictionary<any>) { |
| 59 | option && each(LAYOUT_PROPERTIES, function (prop) { |
no outgoing calls
no test coverage detected