(value: any)
| 68 | } |
| 69 | |
| 70 | export function parseJsonArray(value: any): any[] { |
| 71 | if (Array.isArray(value)) return value; |
| 72 | if (typeof value !== "string" || !value.trim()) return []; |
| 73 | try { |
| 74 | const parsed = JSON.parse(value); |
| 75 | return Array.isArray(parsed) ? parsed : []; |
| 76 | } catch (e) { |
| 77 | return []; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | export function copyTextValue(text: any): Promise<boolean> { |
| 82 | const value = String(text == null ? "" : text); |
no test coverage detected