We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 474686b commit 257d430Copy full SHA for 257d430
lib/parse.js
@@ -68,14 +68,20 @@ module.exports = warner(class Parser extends EE {
68
if (opt.ondone)
69
this.on(DONE, opt.ondone)
70
else
71
- this.on(DONE, _ => (this.emit('end'), this.emit('close')))
+ this.on(DONE, _ => {
72
+ this.emit('prefinish')
73
+ this.emit('finish')
74
+ this.emit('end')
75
+ this.emit('close')
76
+ })
77
78
this.strict = !!opt.strict
79
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize
80
this.filter = typeof opt.filter === 'function' ? opt.filter : noop
81
82
// have to set this so that streams are ok piping into it
83
this.writable = true
84
+ this.readable = false
85
86
this[QUEUE] = new Yallist()
87
this[BUFFER] = null
0 commit comments