* Get nested properties by path * @param value - Value of an object * @param path - Path to the property
(value: AnyObject, path: string)
| 717 | * @param path - Path to the property |
| 718 | */ |
| 719 | function getDeepProperty(value: AnyObject, path: string): any { |
| 720 | const props = path.split('.'); |
| 721 | for (const p of props) { |
| 722 | value = value[p]; |
| 723 | if (value == null) { |
| 724 | return null; |
| 725 | } |
| 726 | } |
| 727 | return value; |
| 728 | } |
| 729 | |
| 730 | export function filterTemplate(strings: TemplateStringsArray, ...keys: any[]) { |
| 731 | return function filter(ctx: AnyObject) { |