| 243 | // take a set of comparators and determine whether there |
| 244 | // exists a version which can satisfy it |
| 245 | const isSatisfiable = (comparators, options) => { |
| 246 | let result = true |
| 247 | const remainingComparators = comparators.slice() |
| 248 | let testComparator = remainingComparators.pop() |
| 249 | |
| 250 | while (result && remainingComparators.length) { |
| 251 | result = remainingComparators.every((otherComparator) => { |
| 252 | return testComparator.intersects(otherComparator, options) |
| 253 | }) |
| 254 | |
| 255 | testComparator = remainingComparators.pop() |
| 256 | } |
| 257 | |
| 258 | return result |
| 259 | } |
| 260 | |
| 261 | // comprised of xranges, tildes, stars, and gtlt's at this point. |
| 262 | // already replaced the hyphen ranges |