(other)
| 107 | } |
| 108 | |
| 109 | compare (other) { |
| 110 | debug('SemVer.compare', this.version, this.options, other) |
| 111 | if (!(other instanceof SemVer)) { |
| 112 | if (typeof other === 'string' && other === this.version) { |
| 113 | return 0 |
| 114 | } |
| 115 | other = new SemVer(other, this.options) |
| 116 | } |
| 117 | |
| 118 | if (other.version === this.version) { |
| 119 | return 0 |
| 120 | } |
| 121 | |
| 122 | return this.compareMain(other) || this.comparePre(other) |
| 123 | } |
| 124 | |
| 125 | compareMain (other) { |
| 126 | if (!(other instanceof SemVer)) { |
no test coverage detected