Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/tar

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/tar

TypeScript definitions for tar

  • 6.1.13
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
661K
decreased by-8.53%
Maintainers
1
Weekly downloads
 
Created

What is @types/tar?

@types/tar provides TypeScript type definitions for the 'tar' npm package, which is used for creating and extracting tar archives.

What are @types/tar's main functionalities?

Creating a tar archive

This feature allows you to create a tar archive from a list of files and directories. The example code creates a gzip-compressed tar archive named 'archive.tar.gz' containing 'file1', 'file2', and 'directory'.

const tar = require('tar');
tar.c({
  gzip: true,
  file: 'archive.tar.gz'
}, ['file1', 'file2', 'directory']).then(() => {
  console.log('Archive created successfully');
});

Extracting a tar archive

This feature allows you to extract a tar archive to a specified directory. The example code extracts 'archive.tar.gz' into the 'output_directory'.

const tar = require('tar');
tar.x({
  file: 'archive.tar.gz',
  C: 'output_directory'
}).then(() => {
  console.log('Archive extracted successfully');
});

Listing files in a tar archive

This feature allows you to list the files contained in a tar archive. The example code lists the files in 'archive.tar.gz'.

const tar = require('tar');
tar.t({
  file: 'archive.tar.gz'
}).then((list) => {
  console.log('Files in archive:', list);
});

Other packages similar to @types/tar

FAQs

Package last updated on 18 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc