(field: string)
| 7 | * examples: "source.x", "target['x']", "[my.field]" |
| 8 | */ |
| 9 | export function safeFieldName(field: string) { |
| 10 | return field.replace('.', '\\.').replace('[', '\\[').replace(']', '\\]'); |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Make sure the field name is usable in a Vega expression |
no test coverage detected