(value, max = 500)
| 41 | } |
| 42 | |
| 43 | function short(value, max = 500) { |
| 44 | if (value === undefined || value === null) return ""; |
| 45 | const text = typeof value === "string" ? value : JSON.stringify(value); |
| 46 | return text.length > max ? `${text.slice(0, max)}...` : text; |
| 47 | } |
| 48 | |
| 49 | function mask(value = "") { |
| 50 | value = String(value || ""); |