Skip to content

semver: add intersects method #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

ruyadorno
Copy link
Member

@ruyadorno ruyadorno commented Jun 18, 2025

Add an intersects method that return true if there is any overlapping between two different compared Range objects.

import { intersects } from '@vltpkg/semver'
intersects('^1.0.0', '~1.1.1') // true
intersects('1', '2.x.x') // false
intersects('*', '3.1.1') // true

Refs: https://github.com/vltpkg/statusboard/issues/176

Add an `intersects` method that return true if there is any overlapping
between two different compared `Range` objects.

    import { satisfies } from '@vltpkg/semver'
    satisfies('^1.0.0', '~1.1.1') // true
    satisfies('1', '2.x.x') // false
    satisfies('*', '3.1.1') // true

Refs: vltpkg/statusboard#176
@ruyadorno ruyadorno requested a review from lukekarrys June 18, 2025 20:58
Copy link

vercel bot commented Jun 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jun 18, 2025 8:58pm

@ruyadorno ruyadorno merged commit d66ee93 into main Jun 18, 2025
13 checks passed
@ruyadorno ruyadorno deleted the ruyadorno/add-semver-intersects-method branch June 18, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants