okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
a4af4df61
main
files
| AGENTS.md | 451 B |
| README.md | 615 B |
| acceptance.test.ts | 1.9 KiB |
| windows.ts | 365 B |
Repair mergeWindows in windows.ts. A window has finite numeric start/end with start <= end. The optional gap defaults to zero and must be finite and nonnegative, even for empty input. Invalid input values throw RangeError. Return windows sorted by start then end, merging overlaps, touching endpoints, and windows separated by at most gap. Use the maximum end of merged windows, including contained windows. Do not mutate the input array or its objects; returned objects must be new. Preserve the exported function and type. Only windows.ts may be changed. Run node --test acceptance.test.ts. Do not change tests.