šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

tarts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tarts

Create tarballs in node or the browser

2.0.1
latest
Source
npm
Version published
Weekly downloads
1.8K
57.25%
Maintainers
1
Weekly downloads
Ā 
Created
Source

🄧 Tarts

Create tarballs in node or the browser. Tarts is a simple function that takes an array of files and returns a tarball as a Uint8Array.

Creating a tarball

const tar = Tar([{
  name: 'index.html',
  content: '<!doctype html><h1>Hello world</h1>'
}])

Download tarball in browser

const tar = Tar(...)

const a = document.createElement('a')
a.href = URL.createObjectURL(new Blob([tar], { type: 'application/tar' }))
a.download = 'filename.tar'
a.click()

Save to disk in node

const tar = Tar(...)
fs.writeFileSync('my.tar', tar)

Keywords

tar

FAQs

Package last updated on 31 Mar 2022

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