( bytes: Uint8Array )
| 197 | } |
| 198 | |
| 199 | export function extractTar( |
| 200 | bytes: Uint8Array |
| 201 | ): Array<{ path: string; type: "file" | "directory"; bytes?: Uint8Array }> { |
| 202 | return parseTar(bytes).map((entry) => |
| 203 | entry.type === "file" |
| 204 | ? { path: entry.path, type: entry.type, bytes: entry.bytes } |
| 205 | : { path: entry.path, type: entry.type } |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | export type TarInputEntry = |
| 210 | | { |
no test coverage detected