Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Remove 'root' event
Browse files Browse the repository at this point in the history
- After releasing v1.0.0 this functionality is not working correctly anymore.
- As commented in
  #32 (comment)
  people needing this feature should stick to [email protected] versions.
  • Loading branch information
santigimeno committed Mar 9, 2015
1 parent 800e59e commit 97d973a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ exports.parse = function (path, map) {
if (stream.root) {
if(!path)
stream.queue(stream.root)
stream.emit('root', stream.root, count)
count = 0;
stream.root = null;
}
Expand Down
6 changes: 0 additions & 6 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc
stream.on('data', function(data) {
console.log('received:', data);
});

stream.on('root', function(root, count) {
if (!count) {
console.log('no matches found:', root);
}
});
```
awesome!

Expand Down
6 changes: 0 additions & 6 deletions test/multiple_objects_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ var JSONStream = require('../');
var str = fs.readFileSync(file);

var server = net.createServer(function(client) {
var root_calls = 0;
var data_calls = 0;
var parser = JSONStream.parse();
parser.on('root', function(root, count) {
++ root_calls;
it(root_calls).notEqual(2);
});

parser.on('error', function(err) {
console.log(err);
server.close();
Expand Down
16 changes: 0 additions & 16 deletions test/non_object_roots.js

This file was deleted.

0 comments on commit 97d973a

Please sign in to comment.