lib/tap-eater.js
function eat(stream, callback) {
		if (!stream instanceof Stream) {
			throw 'eat() accepts Stream only!';
		}

		this.callback = callback;
		this.consumer = new TapConsumer();
		this.report = {
			pass: false,
			skip: false,
			fail: false,
			total: false,
			failures: [],
			text: ''
		};

		// setup events
		this.consumer.on('data', onData.bind(this));
		this.consumer.on('end', onEnd.bind(this));

		// consume the stream
		stream.setEncoding('utf8');
		stream.pipe(this.consumer);
		// yum-yum!
	}
function eat(stream, callback) {
		if (!stream instanceof Stream) {
			throw 'eat() accepts Stream only!';
		}

		this.callback = callback;
		this.consumer = new TapConsumer();
		this.report = {
			pass: false,
			skip: false,
			fail: false,
			total: false,
			failures: [],
			text: ''
		};

		// setup events
		this.consumer.on('data', onData.bind(this));
		this.consumer.on('end', onEnd.bind(this));

		// consume the stream
		stream.setEncoding('utf8');
		stream.pipe(this.consumer);
		// yum-yum!
	}
function eat ( stream , callback ) { if ( ! stream instanceof Stream ) { throw 'eat() accepts Stream only!' ; } this . callback = callback ; this . consumer = new TapConsumer ( ) ; this . report = { pass : false , skip : false , fail : false , total : false , failures : [ ] , text : '' } ; // setup events this . consumer . on ( 'data' , onData . bind ( this ) ) ; this . consumer . on ( 'end' , onEnd . bind ( this ) ) ; // consume the stream stream . setEncoding ( 'utf8' ) ; stream . pipe ( this . consumer ) ; // yum-yum! }
consumes TAP data from given stream
consumes TAP data from given stream