(name)
| 78 | return /^vm(?:@\d+)?-/.test(name); |
| 79 | } |
| 80 | export function getURI(name) { |
| 81 | const i = name.indexOf('-'); |
| 82 | const [, version] = name.slice(0, i).split('@'); |
| 83 | if (version === '2') { |
| 84 | // uri is encoded by `encodedFilename`, so we should not decode it here |
| 85 | return name.slice(i + 1); |
| 86 | } |
| 87 | try { |
| 88 | return decodeURIComponent(name.slice(3)); |
| 89 | } catch (err) { |
| 90 | return name.slice(3); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | function initConfig() { |
| 95 | function get(key, def) { |