'use strict';
var objectAssign = require('object-assign');
var sep = {};

function create(input, opts) {
	return input.map(function (line) {
		if (typeof line === 'string') {
			line = {text: line};
		}

		if (line === sep) {
			return '---';
		}

		line = objectAssign(line, opts);

		var text = line.text;
		delete line.text;

		if (!text) {
			throw new Error('text required');
		}

		return text.split('\n').map(function (textLine) {
			return textLine + '|' + Object.keys(line).map(function (x) {
				if (x === 'href') {
					x = encodeURI(x);
				}

				return x + '="' + line[x] + '"';
			}).join(' ');
		}).join('\n');
	}).join('\n');
}

module.exports = function (input, opts) {
	console.log(create(input, opts));
};

module.exports.sep = sep;
module.exports.darkMode = process.env.BitBarDarkMode === '1';
module.exports.create = create;

@@ -164,16 +164,44 @@
 'string'
+ %7C%7C typeof line === 'number'
 ) %7B%0A%09%09%09l
@@ -318,16 +318,23 @@
  text = 
+String(
 line.tex
@@ -334,16 +334,17 @@
 ine.text
+)
 ;%0A%09%09dele

Accept strings and numbers as input