Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 968 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 968 Bytes

semver-intersect npm Build Status David Downloads Greenkeeper badge

Get the intersection of multiple semver ranges

const { intersect } = require('semver-intersect');

// ^4.1.0
intersect('^4.0.0', '^4.1.0');

// ~4.3.0
intersect('^4.0.0', '~4.3.0');

// ~4.3.89
intersect('^4.0.0', '~4.3.89', '~4.3.24', '~4.3.63');

// throws "Range >=4.5.0 is not compatible with <4.4.0"
intersect('^4.0.0', '~4.3.0', '^4.5.0')