stream-flow-control
Version:
Stream Flow Control
45 lines (44 loc) • 800 B
YAML
_editorAttrs:
documentId: i3r6FHS1pkTny8wnszKfalYN4VW993ie
duplex:
type: Duplex
_editorAttrs:
pos:
x: 140
'y': 210
pipe:
- type: Transform
name: transform
methods:
read:
code: |-
this.push('A string');
this.push(null);
params: []
write:
code: 'fs.writeFile(path.join(__dirname,''./manager.out''), chunk, callback);'
params:
- chunk
- encoding
- callback
transform:
type: Transform
_editorAttrs:
pos:
x: 130
'y': 60
pipe:
- type: Duplex
name: duplex
methods:
transform:
code: |-
this.push(chunk+' with transformations');
callback();
params:
- chunk
- encoding
- callback
_require:
fs: fs
path: path