(opt: Dictionary<any>, path: string)
| 27 | import { deprecateLog, deprecateReplaceLog } from '../util/log'; |
| 28 | |
| 29 | function 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 | |
| 41 | function set(opt: Dictionary<any>, path: string, val: any, overwrite?: boolean) { |
| 42 | const pathArr = path.split(','); |
no outgoing calls
no test coverage detected