mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
node stream parsing wip
This commit is contained in:
parent
ec63085fba
commit
e88cd0cd7e
5 changed files with 127 additions and 13 deletions
|
|
@ -12,6 +12,15 @@ var echo = function (data) {
|
|||
console.log(string);
|
||||
};
|
||||
|
||||
//var stream = fs.createReadStream(argv._[0]);
|
||||
//
|
||||
//var demo = Demo.fromNodeStream(stream);
|
||||
//var parser = demo.getParser();
|
||||
//parser.on('done', function (state) {
|
||||
// echo(state);
|
||||
//});
|
||||
//parser.start();
|
||||
|
||||
fs.readFile(argv._[0], function (err, data) {
|
||||
if (err) throw err;
|
||||
var demo = Demo.fromNodeBuffer(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue