(value)
| 290 | } |
| 291 | |
| 292 | function toIso(value) { |
| 293 | const date = value ? new Date(value) : new Date() |
| 294 | return Number.isNaN(date.getTime()) ? new Date().toISOString() : date.toISOString() |
| 295 | } |
| 296 | |
| 297 | function cleanText(text) { |
| 298 | return String(text == null ? '' : text).replace(INVALID_XML_CHARS, '') |