okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-142c-small into f-142407ea8192

main
615 B1 lineraw

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.

1Repair 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.