MCPcopy
hub / github.com/browserslist/browserslist / compareSemver

Function compareSemver

index.js:145–151  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

143}
144
145function compareSemver(a, b) {
146 return (
147 compare(parseInt(a[0]), parseInt(b[0])) ||
148 compare(parseInt(a[1] || '0'), parseInt(b[1] || '0')) ||
149 compare(parseInt(a[2] || '0'), parseInt(b[2] || '0'))
150 )
151}
152
153// this follows the npm-like semver behavior
154function semverFilterLoose(operator, range) {

Callers 2

generateSemverFilterFunction · 0.85
browserslistFunction · 0.85

Calls 1

compareFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…