'use strict';

// FIXME: clean-up once split is ready
// var splitStream = require( '@stdlib/streams/utils/split' );
var joinStream = require( './../lib' );

var split;
var join;
var i;

// Create a split stream for tab delimited data:
// split = splitStream({
// 	'sep': /\t/
// });

// Create a stream to make newline delimited data:
join = joinStream({
	'sep': '\n'
});

// Create a stream pipeline:
// split
// 	.pipe( join )
// 	.pipe( process.stdout );
join.pipe( process.stdout );

// Write values to the split stream...
for ( i = 0; i < 10; i++ ) {
	// split.write( i+'\t', 'utf8'  );
	join.write( ''+i, 'utf8' )
}
// split.end();
join.end();

'use strict';

// FIXME: clean-up once split is ready
// var splitStream = require( '@stdlib/streams/utils/split' );
var joinStream = require( './../lib' );

var split;
var join;
var i;

// Create a split stream for tab delimited data:
// split = splitStream({
// 	'sep': /\t/
// });

// Create a stream to make newline delimited data:
join = joinStream({
	'sep': '\n'
});

// TODO: do not use process.stdout; replace with a map stream which outputs using `console.log`; ditto in the README and src examples
// Create a stream pipeline:
// split
// 	.pipe( join )
// 	.pipe( process.stdout );
join.pipe( process.stdout );

// Write values to the split stream...
for ( i = 0; i < 10; i++ ) {
	// split.write( i+'\t', 'utf8'  );
	join.write( ''+i, 'utf8' )
}
// split.end();
join.end();

Add TODO item to make examples browser compatible
Add TODO item to make examples browser compatible
