(description)
| 245 | ]); |
| 246 | |
| 247 | export function isDescriptionComplete(description) { |
| 248 | const trimmed = description.trim(); |
| 249 | |
| 250 | if (trimmed === "") { |
| 251 | return true; |
| 252 | } |
| 253 | |
| 254 | if (/[,;:]$/u.test(trimmed)) { |
| 255 | return false; |
| 256 | } |
| 257 | |
| 258 | const lastWord = trimmed |
| 259 | .split(/\s+/u) |
| 260 | .at(-1) |
| 261 | ?.replace(/[^\p{L}\p{N}-]/gu, "") |
| 262 | .toLowerCase(); |
| 263 | |
| 264 | return lastWord === undefined || !DANGLING_TAIL.has(lastWord); |
| 265 | } |
| 266 | |
| 267 | function assertCatalogDescriptionsComplete(catalog) { |
| 268 | const bad = []; |
no test coverage detected