(value, max = 260)
| 37 | } |
| 38 | |
| 39 | function short(value, max = 260) { |
| 40 | if (value === undefined || value === null) return ""; |
| 41 | const text = typeof value === "string" ? value : JSON.stringify(value); |
| 42 | return text.length > max ? `${text.slice(0, max)}...` : text; |
| 43 | } |
| 44 | |
| 45 | function maskToken(token = "") { |
| 46 | const value = String(token || ""); |