(value: any)
| 211 | } |
| 212 | |
| 213 | function cleanEntityId(value: any): string | undefined { |
| 214 | if (value === undefined || value === null) return undefined; |
| 215 | let text: string; |
| 216 | if (typeof value === "bigint") { |
| 217 | text = value.toString(); |
| 218 | } else { |
| 219 | text = String(value); |
| 220 | } |
| 221 | if (!text) return undefined; |
| 222 | if (text.startsWith("-100")) return text.slice(4); |
| 223 | if (text.startsWith("-")) return text.slice(1); |
| 224 | return text; |
| 225 | } |
| 226 | |
| 227 | function buildEntityLink(entity: any): string | undefined { |
| 228 | if (!entity) return undefined; |
no outgoing calls
no test coverage detected