@npm-book/tarball
v1.1.0
Published
download tarball
Downloads
9
Readme
@npm-book/tarball
This is a toolkit for downloading tar package.
安装(Install)
$ npm install @npm-book/tarball
使用(Usage)
const fs = require('fs');
const downloadTarball = require('./')
const assert = require('assert');
async function testDownloadTarball() {
await downloadTarball('https://registry.npmmirror.com/node-fetch/-/node-fetch-2.6.7.tgz');
assert.strictEqual(fs.existsSync('./package'), true, "download tarball");
}
testDownloadTarball();