Switch branches/tags
Find file History
#17205 Compare This branch is 572 commits behind latest.
Latest commit 25a234b Oct 15, 2015 @othiym23 othiym23 committed with iarna src: install npm@3 with npm@2
Restore the ability to do one-shot upgrades from the versions of npm
bundled with Node 0.8 to npm@3, which simplifies using Travis with old
Node and new npm, for compatibility testing purposes. Older versions of
npm repack packages on install, which works poorly with the way npm@3
handles bundledDependencies with flat trees.

Fixes: #9668

PR-URL: #9981
Failed to load latest commit information.
examples tar@1.0.2 Oct 31, 2014
lib tar@2.2.0 Aug 28, 2015
.npmignore tar@0.1.16 Feb 6, 2013
LICENSE tar@2.1.1 May 8, 2015
README.md tar@2.1.0 Apr 17, 2015



Tar for Node.js.



See examples/ for usage examples.

var tar = require('tar')

Returns an object with .Pack, .Extract and .Parse methods.


Returns a through stream. Use fstream to write files into the pack stream and you will receive tar archive data from the pack stream.

This only works with directories, it does not work with individual files.

The optional properties object are used to set properties in the tar 'Global Extended Header'. If the fromBase property is set to true, the tar will contain files relative to the path passed, and not with the path included.


Returns a through stream. Write tar data to the stream and the files in the tarball will be extracted onto the filesystem.

options can be:

  path: '/path/to/extract/tar/into',
  strip: 0, // how many path segments to strip from the root when extracting

options also get passed to the fstream.Writer instance that tar uses internally.


Returns a writable stream. Write tar data to it and it will emit entry events for each entry parsed from the tarball. This is used by tar.Extract.