Sha256: 19b1a82b29fe1ef8cad9258500bf93af8b7df63531c211e27076f8c586f6aff5

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 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.toString())
})
buffers.write(new Buffer('pizza Array is not a ', 'utf8'))
buffers.write(new Buffer('stringy cat'))
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

3 entries across 3 versions & 2 rubygems

Version Path
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/concat-stream/test.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/concat-stream/test.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/concat-stream/test.js