[Pkg-javascript-commits] [node-jsonstream] 43/214: Emit 'root' event when no matches are found
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-jsonstream.
commit caef198f2d772f594477717c4b0f41a554be8d99
Author: Malte-Thorben Bruns <skenqbx at googlemail.com>
Date: Sat Jul 14 17:32:57 2012 +0300
Emit 'root' event when no matches are found
---
index.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index f192591..a6f96d5 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,3 @@
-
var Parser = require('jsonparse')
, Stream = require('stream').Stream
@@ -74,6 +73,8 @@ exports.parse = function (path) {
stream.write(data)
if(!count && !path)
stream.emit('data', stream.root)
+ else if(!count)
+ stream.emit('root', stream.root)
stream.emit('end')
}
return stream
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git
More information about the Pkg-javascript-commits
mailing list