(value: string, format?: JSONStringFormat)
| 87 | } |
| 88 | |
| 89 | function formatString(value: string, format?: JSONStringFormat): string { |
| 90 | if (!format) { |
| 91 | return value; |
| 92 | } |
| 93 | |
| 94 | switch (format.name) { |
| 95 | case "email": |
| 96 | return value; |
| 97 | case "uri": |
| 98 | return value; |
| 99 | case "datetime": |
| 100 | return formatDateTime(value, format); |
| 101 | default: |
| 102 | return value; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | export function formatDateTime( |
| 107 | value: string, |
no test coverage detected