| 998 | } |
| 999 | |
| 1000 | func exportStringArray(rt *goja.Runtime, val goja.Value) []string { |
| 1001 | if val == nil || goja.IsUndefined(val) || goja.IsNull(val) { |
| 1002 | return nil |
| 1003 | } |
| 1004 | exported := val.Export() |
| 1005 | if arr, ok := exported.([]interface{}); ok { |
| 1006 | var result []string |
| 1007 | for _, item := range arr { |
| 1008 | if s, ok := item.(string); ok { |
| 1009 | result = append(result, s) |
| 1010 | } |
| 1011 | } |
| 1012 | return result |
| 1013 | } |
| 1014 | return nil |
| 1015 | } |
| 1016 | |
| 1017 | func convertQtFormatToGo(qtFmt string) string { |
| 1018 | r := strings.NewReplacer( |