(id)
| 22 | }; |
| 23 | |
| 24 | function parseEnvId(id) { |
| 25 | var result = { id: id }; |
| 26 | |
| 27 | var match = id.match(RE.engine); |
| 28 | if (!match) throw new Error("Unable to parse environment id: " + id); |
| 29 | |
| 30 | result.name = match[1]; |
| 31 | result.version = parseVersion(match[2]); |
| 32 | |
| 33 | return result; |
| 34 | } |
| 35 | |
| 36 | function parseVersion(version) { |
| 37 | if (!version) return null; |
no test coverage detected