Initial commit
This commit is contained in:
15
themes/keepit/node_modules/stream-transform/samples/module.sync.js
generated
vendored
Normal file
15
themes/keepit/node_modules/stream-transform/samples/module.sync.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
const transform = require('..')
|
||||
|
||||
transform([
|
||||
['1','2','3','4'],
|
||||
['a','b','c','d']
|
||||
], function(data){
|
||||
data.push(data.shift())
|
||||
return data.join(',')+'\n'
|
||||
})
|
||||
.pipe(process.stdout)
|
||||
|
||||
// Output:
|
||||
// 2,3,4,1
|
||||
// b,c,d,a
|
||||
Reference in New Issue
Block a user