showing results for - "how to unzip files in node js"
Rebeca
25 Jun 2020
1/*
2    This code comes from Vincent Lab
3    And it has a video version linked here: https://www.youtube.com/watch?v=fFhB2PYVDzQ
4*/
5
6// Import dependencies
7const decompress = require("decompress");
8const path = require("path");
9
10(async () => {
11
12    try {
13        const files = await decompress("unicorn.zip", "dist", {
14            filter: file => path.extname(file.path) !== ".exe"
15        });
16        console.log(files);
17    } catch (error) {
18        console.log(error);
19    }
20
21})();
22
23// decompress("unicorn.zip", "dist").then(files => {
24//     console.log("done!");
25// });
26
27
28// // Filter out files before extracting
29// try {
30//     const files = await decompress("unicorn.zip", "dist", {
31//         filter: file => path.extname(file.path) !== ".exe"
32//     });
33//     console.log("done!");
34// } catch (error) {
35//     console.log(error);
36// }
37
38
39// // Map files before extracting
40// try {
41//     const files = await decompress("unicorn.zip", "dist", {
42//         map: file => {
43//             file.path = `unicorn-${file.path}`;
44//             return file;
45//         }
46//     });
47//     console.log("done!");
48// } catch (error) {
49//     console.log(error);
50// }
queries leading to this page
how to unzip file in nodejshow to unzip data in javascriptunzip files using nodejsnode js unzip file exampleunzip to a folder node jsnode js unzip filesnodejs compress unzipunzip zip file node jsnodejs download and unzip from linknode unzip responseunzip files in node jszip and unzip nodejsnode unzip libunzip a zip file node jsnode jszip how to unzipnode js unzipunzip file node jsnode download and unzip fileunzip file nodejsnode js unzip filenodejs unzip file node js unzip zipunzip nodenodejs unzipunzip any zip file node jshow to gunzip node jsnodejs unzip files in directorynode unzip dataunzip archive nodeunzip and read file nodejsnode js unzip fileunzip files in different folder nodejsunzip a file nodejsbest node js unzipinstall unzip in node jsnodejs unzip to foldernodejs zip unziphow to unzip files in node jsextract zip file nodejsunzip a file in nodezip unzip nodejsnodejs unzip foldernode unzipnodejs unzip using execunzip files inside zipped files in node jsnode jszip unzip filejavascript unzip filesunzip file i node jsunzip file nodhow to unzip files in nodeunzip file in nodejshow to unzip file in node jsnodejs unzip filesnode archiver unzipunzip folder nodejsunzip gzip in nodejsunzip files nodejsnodejs unzip zip binarynodejs archiver unzipnode unzip2 node typesunzip node typeszip and unzip with nodejshow to unzip file via node jsnodejs extract zip fileunzip file with node jsunzip nodejsunzip file promise nodejsunzip file using nodejsunzip nodejs 3fzip unzip files nodejsunzip npmjshow to unzip files in node jsnodejs unzip zip filenodejs exec unzipuse unzip 27 2a zip 27 in nodejshow to unzip files in node js