Sha256: dc3833c3501573e95ea47f1c81251ccbc971b1bf0996fb81cad954bb6638b31d

Contents?: true

Size: 706 Bytes

Versions: 8

Compression:

Stored size: 706 Bytes

Contents

var spawn = require('child_process').spawn
var concat = require('./')

// real world example
var cmd = spawn('ls')
cmd.stdout.pipe(
  concat(function(err, out) {
    console.log('`ls`', err, out.toString())
  })
)

// array stream
var arrays = concat(function(err, out) {
  console.log('arrays', err, out)
})
arrays.write([1,2,3])
arrays.write([4,5,6])
arrays.end()

// buffer stream
var buffers = concat(function(err, out) {
  console.log('buffers', err, out)
})
buffers.write(new Buffer('pizza '))
buffers.write(new Buffer('cats'))
buffers.end()

// string stream
var strings = concat(function(err, out) {
  console.log('strings', err, out)
})
strings.write("nacho ")
strings.write("dogs")
strings.end()

Version data entries

8 entries across 6 versions & 3 rubygems

Version Path
snowball-0.1.22 node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js
sprockets-browserify-0.1.2 node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js
sprockets-browserify-0.1.2 node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js
sprockets-browserify-0.1.0 node_modules/module-deps/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js
sprockets-browserify-0.1.0 node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js