(version)
| 22 | } |
| 23 | |
| 24 | function fromString(version) { |
| 25 | const versionRE = /([-a-zA-Z]+)([0-9\.]+)/; |
| 26 | const match = version.toLowerCase().match(versionRE); |
| 27 | if (match && match.length === 3) { |
| 28 | return { |
| 29 | sdk: match[1], |
| 30 | version: match[2], |
| 31 | }; |
| 32 | } |
| 33 | return undefined; |
| 34 | } |
| 35 | |
| 36 | module.exports = { |
| 37 | compatible, |