MCPcopy
hub / github.com/npm/node-semver / test

Method test

classes/range.js:196–215  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

194
195 // if ANY of the sets match ALL of its comparators, then pass
196 test (version) {
197 if (!version) {
198 return false
199 }
200
201 if (typeof version === 'string') {
202 try {
203 version = new SemVer(version, this.options)
204 } catch (er) {
205 return false
206 }
207 }
208
209 for (let i = 0; i < this.set.length; i++) {
210 if (testSet(this.set[i], version, this.options)) {
211 return true
212 }
213 }
214 return false
215 }
216}
217
218module.exports = Range

Callers 15

constructorMethod · 0.45
testSetFunction · 0.45
map.jsFile · 0.45
comparator.jsFile · 0.45
semver.jsFile · 0.45
range.jsFile · 0.45
compare.jsFile · 0.45
gt.jsFile · 0.45
gte.jsFile · 0.45
valid.jsFile · 0.45
cmp.jsFile · 0.45
lte.jsFile · 0.45

Calls 1

testSetFunction · 0.85

Tested by

no test coverage detected