-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated naming to be more like James' C++ impl: nodejs/node#16414 Fixed some bugs. stdout-source works again.
- Loading branch information
1 parent
f1f1d27
commit 1ffe4be
Showing
7 changed files
with
52 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
'use strict' | ||
|
||
const FileSource = require('../fs/file-source') | ||
const stdoutSink = require('../stdio/stdout-sink') | ||
const StdoutSink = require('../stdio/stdout-sink') | ||
|
||
const fileSource = new FileSource(process.argv[2]) | ||
stdoutSink(error => console.error('ERROR!', error))(fileSource.read.bind(fileSource)) | ||
const stdoutSink = new StdoutSink() | ||
|
||
stdoutSink.bindSource(fileSource, error => { | ||
if (error) | ||
console.error('ERROR!', error) | ||
else { | ||
console.log('done') | ||
} | ||
}) |