0.0.1 • Published 7 years ago

array-split-stream v0.0.1

Weekly downloads
48
License
CC0-1.0
Repository
github
Last release
7 years ago


A nodeJS through2 transform stream that splits incoming arrays, emitting each array entry as a separate data event to.

Install

npm install array-split-stream

Usage

var splitter = require('array-split-stream')

splitter.on('data', function(entry) {
  console.log('entry:', entry)
})

splitter.on('end', function() {
  console.log('done')
})

splitter.write([1, 2, 3])
splitter.write(['orange', 'apple', 'tomato'])
splitter.end()

// entry: 1
// entry: 2
// entry: 3
// entry: orange
// entry: apple
// entry: tomato
// done

License

To the extent possible by law, we transfer any rights we have in the this code to the public domain. Specifically, we do so using the CC0 1.0 Universal Public Domain Dedication.

You can do whatever you want with this code. No need to credit us, link to us, include any license, or anything else. But if you want to do those things, you're free to do that too.