stream-flow-control
Version:
Stream Flow Control
24 lines • 405 B
YAML
_require:
fs: fs
_customTypes:
read_file:
constructor: |
return fs.createReadStream(options.file)
start:
type: read_file
options:
file: ./data/rubbish.txt
pipe:
- type: Writable
name: end
end:
type: Writable
methods:
write:
params:
- chunk
- encoding
- callback
code: |
console.log(chunk.toString());
callback()