6.0.0 • Published 10 months ago

@voxpelli/semver-set v6.0.0

Weekly downloads
5,727
License
MIT
Repository
github
Last release
10 months ago

@voxpelli/semver-set

Finds intersections between semantic version ranges.

npm version npm downloads Module type: ESM Types in JS neostandard javascript style Follow @voxpelli@mastodon.social

Started out as a fork of izaakschroeder/semver-set, triggered by the lack of bug fixes in that project, but has now been rewritten from scratch to fix issue with missing license in original project.

Usage

semverIntersect(firstRange, secondRange, { loose: false })

Supports the semver loose option in an optional third argument.

import { semverIntersect } from '@voxpelli/semver-set';

// ^2.2.0
semverIntersect('^1.1 || ^2.2 || >=5', '^2.2.0-alpha1');

// undefined
semverIntersect('~2.2.4', '~2.3.0');

intersect(...ranges) (deprecated)

The original semver-set intersect() method is supported to ensure backwards compatibility

import { intersect } from '@voxpelli/semver-set';

// ^2.2.0
intersect('^1.1 || ^2.2 || >=5', '^2.2.0-alpha1');

// null
intersect('~2.2.4', '~2.3.0');
6.0.0

10 months ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.0

3 years ago

3.0.0

4 years ago

3.0.0-0

4 years ago

2.0.1

5 years ago

2.0.0-1

5 years ago

2.0.0

5 years ago

2.0.0-0

5 years ago

1.0.1

7 years ago

1.0.0

8 years ago