[Pkg-javascript-commits] [node-jsonstream] 51/214: emit the root object if the path is empty/null
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:39 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 1818009d97296ea9229afef51b8ff3d48281e13d
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Fri Sep 7 13:43:50 2012 +0200
emit the root object if the path is empty/null
---
index.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/index.js b/index.js
index 66e9d0c..9428fd1 100644
--- a/index.js
+++ b/index.js
@@ -71,6 +71,8 @@ exports.parse = function (path) {
stream.end = function (data) {
if(data)
stream.write(data)
+ if(!path)
+ stream.emit('data', stream.root)
stream.emit('root', stream.root, count)
stream.emit('end')
}
--
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