Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnestacado committed Dec 16, 2016
1 parent 50d936c commit de2e31a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const ChunkParser = require("chunk2json");
const parser = new ChunkParser();

parser.on("json", (jsonBuff) => {
const jsonObj = JSON.parse(jsonBuff);
console.log(jsonObj.length); // Prints 2
const result = JSON.parse(jsonBuff);
console.log(result); // Prints the expected array
});

parser.consume(new Buffer('[{"name": "Frank Castle"'));
Expand Down

0 comments on commit de2e31a

Please sign in to comment.