Spaces:
Sleeping
Sleeping
File size: 482 Bytes
9f91f81 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /**
* @fileoverview Code path related utilities.
*/
"use strict";
/**
* Checks all segments in a set and returns true if any are reachable.
* @param {Set<CodePathSegment>} segments The segments to check.
* @returns {boolean} `true` if any segment is reachable; `false` otherwise.
*/
function isAnySegmentReachable(segments) {
for (const segment of segments) {
if (segment.reachable) {
return true;
}
}
return false;
}
module.exports = { isAnySegmentReachable };
|