(version)
| 1 | #!/usr/bin/env node |
| 2 | function _parseBootstrapSemver(version) { |
| 3 | const match = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(String(version || '')); |
| 4 | if (!match) return null; |
| 5 | return { |
| 6 | major: match[1], |
| 7 | minor: match[2], |
| 8 | patch: match[3], |
| 9 | prerelease: match[4] ? match[4].split('.') : [], |
| 10 | }; |
| 11 | } |
| 12 | |
| 13 | function _compareBootstrapNumeric(left, right) { |
| 14 | if (left.length !== right.length) return left.length - right.length; |
no outgoing calls
no test coverage detected