From dac31360e2e7af28b1af660dec889237125a01e3 Mon Sep 17 00:00:00 2001 From: Ahmet Simsek Date: Tue, 31 Oct 2017 12:12:25 +0200 Subject: [PATCH] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a3f7f8..b4edfcc 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,9 @@ $ npm install unzip ### Extract to a directory ```javascript -fs.createReadStream('path/to/archive.zip').pipe(unzip.Extract({ path: 'output/path' })); +const stream = fs.createReadStream('path/to/archive.zip').pipe(unzip.Extract({ path: 'output/path' })); + +stream.on('finish', function () { ... }); ``` Extract emits the 'close' event once the zip's contents have been fully extracted to disk.