How to use the simplifyRange function from semver

Find comprehensive JavaScript semver.simplifyRange code examples handpicked from public code repositorys.

196
197
198
199
200
201
202
203
204
205
        : vr.join(' - '))
    }
  }
  const metavuln = ranges.join(' || ').trim()
  this.range = !metavuln ? '<0.0.0-0'
    : semver.simplifyRange(this.versions, metavuln, semverOpt)
}

// returns true if marked as vulnerable, false if ok
// spec is a dependency specifier, for metavuln cases
fork icon10
star icon11
watch icon13

+ 3 other calls in file

186
187
188
189
190
191
192
193
194
195
    return this[_simpleRange]
  }

  const versions = [...this.advisories][0].versions
  const range = this.range
  const simple = simplifyRange(versions, range, semverOpt)
  return this[_simpleRange] = this[_range] = simple
}

isVulnerable (node) {
fork icon0
star icon0
watch icon1

+ 6 other calls in file