From 0eedd881d4f5e34036690cf17aa5dedbb153be99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Leurent?= <131.js@cloudyks.org> Date: Sat, 22 Oct 2016 22:59:15 +0200 Subject: [PATCH] Update README.md (#60) Fix minor typo where chained callback is described as "next" when it's expressed as "callback" --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index be33c5e..96abbca 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,18 @@ pack.pipe(process.stdout) ## Extracting -To extract a stream use `tar.extract()` and listen for `extract.on('entry', header, stream, callback)` +To extract a stream use `tar.extract()` and listen for `extract.on('entry', (header, stream, next) )` ``` js var extract = tar.extract() -extract.on('entry', function(header, stream, callback) { +extract.on('entry', function(header, stream, next) { // header is the tar header // stream is the content body (might be an empty stream) // call next when you are done with this entry stream.on('end', function() { - callback() // ready for next entry + next() // ready for next entry }) stream.resume() // just auto drain the stream