npm.io
1.0.1 • Published 1 year agoCLI

@compilets/untar-url

Licence
MIT
Version
1.0.1
Deps
2
Size
6 kB
Vulns
0
Weekly
0
Stars
1

untar-url

Untar remote or local .tar/.tar.gz file to local disk.

Import

import {untar} from '@compilets/untar-url';

API

interface UntarOptions {
    filter?: (fileName: string) => boolean;
}
export declare function untar(url: string, targetDir: string, options?: UntarOptions): Promise<void>;

Example

import {untar} from '@compilets/untar-url';

await untar('https://some.tar.gz', '/tmp/mytar');

CLI

npx untar-url https://some.tar.gz /tmp/mytar