Strips template syntax from each item, filters empties, and returns null if nothing remains.
(arr: string[] | null)
| 21 | |
| 22 | /** Strips template syntax from each item, filters empties, and returns null if nothing remains. */ |
| 23 | function sanitizeStringArray(arr: string[] | null): string[] | null { |
| 24 | if (arr === null) { |
| 25 | return null; |
| 26 | } |
| 27 | const result = arr.map(stripTemplateSyntax).filter(s => s.trim() !== ''); |
| 28 | return result.length > 0 ? result : null; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Returns a copy of the route with Liquid template syntax stripped from all |
no test coverage detected