UNPKG
@byu-oit/tfvm
Version:
latest (0.3.0)
0.3.0
0.3.0-beta.6
0.3.0-beta.5
0.3.0-beta.4
0.3.0-beta.3
0.3.0-beta.2
0.3.0-beta.1
0.3.0-beta.0
0.2.0
0.1.0
0.1.0-beta.2
0.1.0-beta.1
0.1.0-beta.0
0.0.2-beta.3
0.0.2-beta.2
0.0.2-beta.1
0.0.2-beta.0
A CLI app for easily switching between Terraform versions
github.com/byu-oit/tfvm
byu-oit/tfvm
@byu-oit/tfvm
/
lib
/
util
/
unzipFile.js
10 lines
(7 loc)
•
258 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
StreamZip
from
'node-stream-zip'
async
function
unzipFile
(
zipPath, newFolder
) {
const
zip =
new
StreamZip
.
async
({
file
: zipPath })
// eslint-disable-line new-cap
await
zip.
extract
(
null
, newFolder)
await
zip.
close
() }
export
default
unzipFile