(str: string)
| 251 | } |
| 252 | |
| 253 | function parseBytes(str: string) { |
| 254 | const m = /^(\d+)([tgmk]b)?$/.exec(str); |
| 255 | if (m) { |
| 256 | const [, strn, stru] = m; |
| 257 | const n = parseInt(strn, 10); |
| 258 | const u = stru && { t: 2 ** 40, g: 2 ** 30, m: 2 ** 20, k: 2 ** 10 }[stru[0]] || 1; |
| 259 | return n * u; |
| 260 | } |
| 261 | return 0; |
| 262 | } |
| 263 | |
| 264 | function mergeMounts(imageMetadata: ImageMetadataEntry[]): (Mount | string)[] | undefined { |
| 265 | const seen = new Set<string>(); |
no test coverage detected