docs: function TableOutputStream(args)
  {
  	var out, sep, cols, label, emit;
  
  	mod_assert.object(args, 'args');
  	mod_assert.ok(Array.isArray(args.columns),
  	    'args.columns must be an array');
  	mod_assert.optionalObject(args.stream, 'args.stream');
  	mod_assert.optionalString(args.columnSeparator, 'args.columnSeparator');
  	mod_assert.optionalString(args.rowSeparator, 'args.rowSeparator');
  
  	out = args.stream || process.stdout;
  	sep = args.columnSeparator || ' ';
  	cols = [];
  
  	this.tos_out = out;
  	this.tos_cols = cols;
  	this.tos_header = args['omitHeader'] ? false : true;
  	this.tos_endrecord = args.rowSeparator || '\n';
  	this.tos_sep = sep;
  
  	args.columns.forEach(function (col, i) {
  		var fmt;
  
  		if (typeof (col) == 'string') {
  			cols.push({
  			    'label': col,
  			    'alias': col,
  			    'align': 'left',
  			    'emit': function (value, last) {
  				fprintf(out, '%s' + (last ? '' : sep), value);
  			    }
  			});
  
  			return;
  		}
  
  		label = 'args.columns[' + i + ']';
  		mod_assert.object(col, label);
  		mod_assert.optionalString(col.label, label + '.label');
  		mod_assert.optionalString(col.alias, label + '.alias');
  
  		mod_assert.optionalNumber(col.width, label + '.width');
  		if (col.hasOwnProperty('width'))
  			mod_assert.ok(col.width > 0,
  			    label + '.width must be a positive number');
  
  		mod_assert.optionalString(col.align, label + '.align');
  		if (col.hasOwnProperty('align'))
  			mod_assert.ok(col.align == 'left' ||
  			    col.align == 'right',
  			    label + '.align must be "left" or "right"');
  
  		if (!col['width'])
  			fmt = '%s';
  		else if (!col['align'] || col['align'] == 'left')
  			fmt = '%-' + col['width'] + 's';
  		else
  			fmt = '%' + col['width'] + 's';
  
  		emit = function (value, last) {
  			fprintf(out, last ? fmt : fmt + sep, value);
  		};
  
  		cols.push({
  		    'label': col.label || '',
  		    'alias': col.alias || col.label || '',
  		    'align': col.align || 'left',
  		    'width': col.width,
  		    'emit': emit
  		});
  	});
  }