https://github.com/hungtcs/tar-extract
A node.js package for extracting .tar and .tar.gz files
https://github.com/hungtcs/tar-extract
Last synced: over 1 year ago
JSON representation
A node.js package for extracting .tar and .tar.gz files
- Host: GitHub
- URL: https://github.com/hungtcs/tar-extract
- Owner: hungtcs
- Created: 2023-09-20T08:55:13.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T09:01:43.000Z (almost 3 years ago)
- Last Synced: 2025-02-27T15:38:48.036Z (over 1 year ago)
- Language: TypeScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tar Extract
`tar-extract` is a Node.js package for extracting `.tar` and `.tar.gz` files.
It provides a simple and easy-to-use API for decompressing these common archive file formats.
## Installation
```shell
npm install tar-extract
```
Or use pnpm:
```shell
pnpm add tar-extract
```
## Usage Example
```ts
import { extract } from "tar-extract";
extract("./00.tar.gz", "./").catch((err) =>
console.error("extract failed: ", err)
);
```
## API Documentation
### `extract(path: string, dest: string)`
Extracts a `.tar` or `.tar.gz` file to the specified directory.
- `path` path of the archive file
- `dest` path to extract to