Skip to content

Commit b95f4ca

Browse files
committed
remove process.nextTicks
closes #1
1 parent ea50dc3 commit b95f4ca

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ Stringify.prototype._transform = function (doc, enc, cb) {
4545
try {
4646
doc = JSON.stringify(doc, this.replacer, this.space)
4747
} catch (err) {
48-
process.nextTick(function () {
49-
cb(err)
50-
})
48+
cb(err)
5149
return
5250
}
5351

5452
this.push(new Buffer(doc, 'utf8'))
55-
process.nextTick(cb)
53+
cb()
5654
}
5755

5856
Stringify.prototype._flush = function (cb) {
@@ -64,7 +62,7 @@ Stringify.prototype._flush = function (cb) {
6462

6563
this.push(this.close)
6664
this.push(null)
67-
process.nextTick(cb)
65+
cb()
6866
}
6967

7068
Stringify.prototype.destroy = function () {

0 commit comments

Comments
 (0)