(version)
| 59 | } |
| 60 | |
| 61 | test (version) { |
| 62 | debug('Comparator.test', version, this.options.loose) |
| 63 | |
| 64 | if (this.semver === ANY || version === ANY) { |
| 65 | return true |
| 66 | } |
| 67 | |
| 68 | if (typeof version === 'string') { |
| 69 | try { |
| 70 | version = new SemVer(version, this.options) |
| 71 | } catch (er) { |
| 72 | return false |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | return cmp(version, this.operator, this.semver, this.options) |
| 77 | } |
| 78 | |
| 79 | intersects (comp, options) { |
| 80 | if (!(comp instanceof Comparator)) { |