0.1.0 • Published 10 years ago
tar-strip v0.1.0
tar-strip
Most tar package you download from github or gitlab will contain a root folder you may not want, this module will help you extract it out just like the
tarcommand'sstrip-componentsoption.
Usage
var rs = getReadStream();
var ws = getWriteStream();
var stripPack = require('../').createStripPack();
getReadStream()
.pipe(stripPack)
.pipe(getWriteStream())Tar package structure
Before:
master/index.js
master/package.json
master/README.mdAfter:
index.js
package.json
README.mdLICENSE
MIT