SplitterStream = (options = {}, splitters = [' ','\n'], data = "") ->

  splitter = new require('stream').Transform(options)
  splitter._transform = (chunk,format,done) ->

    chunk = chunk.toString()
    for i in [0..(chunk.length - 1)]
      if chunk[i] in splitters
        if data isnt ''
          @push(data)
          data = ''
      else
        data += chunk[i]
    done()

  splitter._flush = -> if data isnt '' then data else null

  return splitter
[ ]