(field: string)
| 14 | * Make sure the field name is usable in a Vega expression |
| 15 | */ |
| 16 | export function exprSafeFieldName(field: string) { |
| 17 | //remove whitespace, period, accessors and logical modifiers |
| 18 | return field.replace(/[.,:;+=\-/<>{}|~!@#$%^*[\]`'"()?\s\\]/g, ''); |
| 19 | } |