Socket
Socket
Sign inDemoInstall

tty-table

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty-table - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

dist/tty-table.bundle.min.js
/**
tty-table: Command line table generator.
Version: 1.0.2
Built: 2015-07-07 09:20:41
Version: 1.0.3
Built: 2015-07-07 16:02:15
Author: Tecfu
*/
!function(b,c){c["true"]=b,require=function d(a,b,c){function e(g,h){if(!b[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,d,a,b,c)}return b[g].exports}for(var f="function"==typeof require&&require,g=0;g<c.length;g++)e(c[g]);return e}({1:[function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=b.exports={},g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(a,b,c){(function(c){"use strict";function d(a){this.enabled=a&&void 0!==a.enabled?a.enabled:l}function e(a){var b=function c(){return f.apply(c,arguments)};return b._styles=a,b.enabled=this.enabled,b.__proto__=p,b}function f(){var a=arguments,b=a.length,c=0!==b&&String(arguments[0]);if(b>1)for(var d=1;b>d;d++)c+=" "+a[d];if(!this.enabled||!c)return c;var e=this._styles,f=e.length,g=i.dim.open;for(!n||-1===e.indexOf("gray")&&-1===e.indexOf("grey")||(i.dim.open="");f--;){var h=i[e[f]];c=h.open+c.replace(h.closeRe,h.open)+h.close}return i.dim.open=g,c}function g(){var a={};return Object.keys(o).forEach(function(b){a[b]={get:function(){return e.call(this,[b])}}}),a}var h=a("escape-string-regexp"),i=a("ansi-styles"),j=a("strip-ansi"),k=a("has-ansi"),l=a("supports-color"),m=Object.defineProperties,n="win32"===c.platform&&!/^xterm/i.test(c.env.TERM);n&&(i.blue.open="");var o=function(){var a={};return Object.keys(i).forEach(function(b){i[b].closeRe=new RegExp(h(i[b].close),"g"),a[b]={get:function(){return e.call(this,this._styles.concat(b))}}}),a}(),p=m(function(){},o);m(d.prototype,g()),b.exports=new d,b.exports.styles=i,b.exports.hasColor=k,b.exports.stripColor=j,b.exports.supportsColor=l}).call(this,a("_process"))},{_process:1,"ansi-styles":3,"escape-string-regexp":4,"has-ansi":5,"strip-ansi":9,"supports-color":7}],3:[function(a,b,c){"use strict";function d(){var a={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return a.colors.grey=a.colors.gray,Object.keys(a).forEach(function(b){var c=a[b];Object.keys(c).forEach(function(b){var d=c[b];a[b]=c[b]={open:"["+d[0]+"m",close:"["+d[1]+"m"}}),Object.defineProperty(a,b,{value:c,enumerable:!1})}),a}Object.defineProperty(b,"exports",{enumerable:!0,get:d})},{}],4:[function(a,b,c){"use strict";var d=/[|\\{}()[\]^$+*?.]/g;b.exports=function(a){if("string"!=typeof a)throw new TypeError("Expected a string");return a.replace(d,"\\$&")}},{}],5:[function(a,b,c){"use strict";var d=a("ansi-regex"),e=new RegExp(d().source);b.exports=e.test.bind(e)},{"ansi-regex":6}],6:[function(a,b,c){"use strict";b.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],7:[function(a,b,c){(function(a){"use strict";var c=a.argv,d=c.indexOf("--"),e=function(a){a="--"+a;var b=c.indexOf(a);return-1!==b&&(-1!==d?d>b:!0)};b.exports=function(){return"FORCE_COLOR"in a.env?!0:e("no-color")||e("no-colors")||e("color=false")?!1:e("color")||e("colors")||e("color=true")||e("color=always")?!0:a.stdout&&!a.stdout.isTTY?!1:"win32"===a.platform?!0:"COLORTERM"in a.env?!0:"dumb"===a.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(a.env.TERM)?!0:!1}()}).call(this,a("_process"))},{_process:1}],8:[function(a,b,c){!function(a){function c(a,b){if("object"!==e(a))return b;for(var d in b)"object"===e(a[d])&&"object"===e(b[d])?a[d]=c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,d){var g=d[0],h=d.length;(a||"object"!==e(g))&&(g={});for(var i=0;h>i;++i){var j=d[i],k=e(j);if("object"===k)for(var l in j){var m=a?f.clone(j[l]):j[l];b?g[l]=c(g[l],m):g[l]=m}}return g}function e(a){return{}.toString.call(a).slice(8,-1).toLowerCase()}var f=function(a){return d(a===!0,!1,arguments)},g="merge";f.recursive=function(a){return d(a===!0,!0,arguments)},f.clone=function(a){var b,c,d=a,g=e(a);if("array"===g)for(d=[],c=a.length,b=0;c>b;++b)d[b]=f.clone(a[b]);else if("object"===g){d={};for(b in a)d[b]=f.clone(a[b])}return d},a?b.exports=f:window[g]=f}("object"==typeof b&&b&&"object"==typeof b.exports&&b.exports)},{}],9:[function(a,b,c){"use strict";var d=a("ansi-regex")();b.exports=function(a){return"string"==typeof a?a.replace(d,""):a}},{"ansi-regex":10}],10:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],11:[function(a,b,c){var d=a("strip-ansi"),e=b.exports=function(a,b,c){"object"==typeof a&&(c=a,a=c.start,b=c.stop),"object"==typeof b&&(c=b,a=a||c.start,b=void 0),b||(b=a,a=0),c||(c={});var e=c.mode||"soft",f="hard"===e?/\b/:/(\S+\s+)/;return function(c){var g=c.toString().split(f).reduce(function(c,f){if("hard"===e)for(var g=0;g<d(f).length;g+=b-a)c.push(f.slice(g,g+b-a));else c.push(f);return c},[]);return g.reduce(function(c,e){if(""===e)return c;var f=e.replace(/\t/g," "),g=c.length-1;if(d(c[g]).length+d(f).length>b)c[g]=c[g].replace(/\s+$/,""),f.split(/\n/).forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))});else if(f.match(/\n/)){var h=f.split(/\n/);c[g]+=h.shift(),h.forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))})}else c[g]+=f;return c},[new Array(a+1).join(" ")]).join("\n")}};e.soft=e,e.hard=function(a,b){return e(a,b,{mode:"hard"})}},{"strip-ansi":9}],"tty-table":[function(b,c,d){(function(d){var e=b("merge"),f=b("chalk"),g=b("strip-ansi"),h=b("wordwrap"),j=function(){var b=this._public={},c=this._private={};c.defaults={marginTop:1,marginLeft:2,maxWidth:20,callback:null,headerAlignment:"center",alignment:"center",paddingRight:0,paddingLeft:0,paddingBottom:0,paddingTop:0,color:!1,headerColor:!1,borderStyle:1,borderStyles:[[{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "}],[{v:"│",l:"┌",j:"┬",h:"─",r:"┐"},{v:"│",l:"├",j:"┼",h:"─",r:"┤"},{v:"│",l:"└",j:"┴",h:"─",r:"┘"}],[{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"}]]},c.GUTTER=1,c.table={columns:[],columnWidths:[],columnInnerWidths:[],header:[],body:[]},c.buildRow=function(a,d){d=d||{};var e=0,f=a.map(function(a,b){var f=c.buildCell(a,b,d),g=f.cellArr;return d.header&&c.table.columnInnerWidths.push(f.width),e=e<g.length?g.length:e,g});e=d.header?e:e+(b.options.paddingBottom+b.options.paddingTop);var g=Array.apply(null,{length:e}).map(Function.call,function(){return[]});return f.forEach(function(a,f){var h=Array(c.table.columnWidths[f]).join(" ");if(!d.header){for(i=0;i<b.options.paddingTop;i++)a.unshift(h);for(i=0;i<b.options.paddingBottom;i++)a.push(h)}for(var j=0;e>j;j++)g[j].push("undefined"!=typeof a[j]?a[j]:h)}),g},c.buildCell=function(a,d,f){var g;f=f||{},f&&f.header?(a=e(!0,b.options,a),c.table.columns.push(a),g=a.value,columnOptions=a):(columnOptions=c.table.columns[d],"object"==typeof a&&(columnOptions=e(!0,columnOptions,a),a=value),g="function"==typeof columnOptions.formatter?columnOptions.formatter(a):a);var h=c.wrapCellContent(g,d,columnOptions,f&&f.header?"header":"body");return g=h.output,{cellArr:g.split("\n"),width:h.width}},c.colorizeAllWords=function(a,b){var c=b.replace(/(\S+)/gi,function(b){return f[a](b)+" "});return c},c.colorizeLine=function(a,b){return f[a](b)},c.wrapCellContent=function(a,d,e,f){var i=a.toString(),j=c.table.columnWidths[d],k=j-e.paddingLeft-e.paddingRight-c.GUTTER;wrap=h(k),i=wrap(i);var l=i.split("\n");return l=l.map(function(a){switch(!0){case"header"===f:a=e.color||b.options.color?c.colorizeLine(e.headerColor||b.options.color,a):a;break;case"string"==typeof e.color:a=c.colorizeLine(e.color,a);break;case"string"==typeof b.options.color:a=c.colorizeLine(b.options.color,a)}a=Array(e.paddingLeft+1).join(" ")+a+Array(e.paddingRight+1).join(" ");var d=g(a).length,h="header"===f?"headerAlignment":"alignment";if(j>d){var i=j-d;switch(!0){case"center"===e[h]:var k=i%2===0;i=k?i:i-1,i>1&&(a=Array(i/2).join(" ")+a+Array(i/2+(k?1:2)).join(" "));break;case"right"===e[h]:a=Array(i).join(" ")+a;break;default:a+=Array(i).join(" ")}}return a}),i=l.join("\n"),{output:i,width:k}},c.getColumnWidths=function(a){var c=a.map(function(a){return"object"==typeof a&&"undefined"!=typeof a.width?a.width:b.options.maxWidth}),e=c.reduce(function(a,b){return a+b});if(e+=b.options.marginLeft,d&&d.stdout&&e>d.stdout.columns){var f=d.stdout.columns>e;f=f.toFixed(2)-.01,c=c.map(function(a){return Math.floor(f*a)})}return c},b.options={},c.setup=function(a,d,f){return b.options=e(!0,c.defaults,f),c.table.columnWidths=c.getColumnWidths(a),a=[a],c.table.header=a.map(function(a){return c.buildRow(a,{header:!0})}),c.table.body=d.map(function(a){return c.buildRow(a)}),b},b.render=function(){var d="",e=["header","body"],f=Array(b.options.marginLeft+1).join(" "),g=b.options.borderStyles[b.options.borderStyle],h=[];for(a=0;a<3;a++)h.push(""),c.table.columnWidths.forEach(function(b,c,d){h[a]+=Array(b).join(g[a].h)+(c+1!==d.length?g[a].j:g[a].r)}),h[a]=g[a].l+h[a],h[a]=h[a].split(""),h[a][h[a].length1]=g[a].r,h[a]=h[a].join(""),h[a]=f+h[a]+"\n";return d+=h[0],e.forEach(function(a,b){for(;c.table[a].length;)row=c.table[a].shift(),row.forEach(function(a){d=d+f+g[1].v+a.join(g[1].v)+g[1].v+"\n"}),(1!=b||0!==c.table[a].length)&&(d+=h[1])}),d+=h[2],Array(b.options.marginTop+1).join("\n")+d}};c.exports=function(a,b,c){var d=new j;return d._private.setup(a,b,c)}}).call(this,b("_process"))},{_process:1,chalk:2,merge:8,"strip-ansi":9,wordwrap:11}]},{},[])}({},function(){return this}());
!function(b,c){c["true"]=b,require=function d(a,b,c){function e(g,h){if(!b[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,d,a,b,c)}return b[g].exports}for(var f="function"==typeof require&&require,g=0;g<c.length;g++)e(c[g]);return e}({1:[function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=b.exports={},g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(a,b,c){(function(c){"use strict";function d(a){this.enabled=a&&void 0!==a.enabled?a.enabled:l}function e(a){var b=function c(){return f.apply(c,arguments)};return b._styles=a,b.enabled=this.enabled,b.__proto__=p,b}function f(){var a=arguments,b=a.length,c=0!==b&&String(arguments[0]);if(b>1)for(var d=1;b>d;d++)c+=" "+a[d];if(!this.enabled||!c)return c;var e=this._styles,f=e.length,g=i.dim.open;for(!n||-1===e.indexOf("gray")&&-1===e.indexOf("grey")||(i.dim.open="");f--;){var h=i[e[f]];c=h.open+c.replace(h.closeRe,h.open)+h.close}return i.dim.open=g,c}function g(){var a={};return Object.keys(o).forEach(function(b){a[b]={get:function(){return e.call(this,[b])}}}),a}var h=a("escape-string-regexp"),i=a("ansi-styles"),j=a("strip-ansi"),k=a("has-ansi"),l=a("supports-color"),m=Object.defineProperties,n="win32"===c.platform&&!/^xterm/i.test(c.env.TERM);n&&(i.blue.open="");var o=function(){var a={};return Object.keys(i).forEach(function(b){i[b].closeRe=new RegExp(h(i[b].close),"g"),a[b]={get:function(){return e.call(this,this._styles.concat(b))}}}),a}(),p=m(function(){},o);m(d.prototype,g()),b.exports=new d,b.exports.styles=i,b.exports.hasColor=k,b.exports.stripColor=j,b.exports.supportsColor=l}).call(this,a("_process"))},{_process:1,"ansi-styles":3,"escape-string-regexp":4,"has-ansi":5,"strip-ansi":9,"supports-color":7}],3:[function(a,b,c){"use strict";function d(){var a={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return a.colors.grey=a.colors.gray,Object.keys(a).forEach(function(b){var c=a[b];Object.keys(c).forEach(function(b){var d=c[b];a[b]=c[b]={open:"["+d[0]+"m",close:"["+d[1]+"m"}}),Object.defineProperty(a,b,{value:c,enumerable:!1})}),a}Object.defineProperty(b,"exports",{enumerable:!0,get:d})},{}],4:[function(a,b,c){"use strict";var d=/[|\\{}()[\]^$+*?.]/g;b.exports=function(a){if("string"!=typeof a)throw new TypeError("Expected a string");return a.replace(d,"\\$&")}},{}],5:[function(a,b,c){"use strict";var d=a("ansi-regex"),e=new RegExp(d().source);b.exports=e.test.bind(e)},{"ansi-regex":6}],6:[function(a,b,c){"use strict";b.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],7:[function(a,b,c){(function(a){"use strict";var c=a.argv,d=c.indexOf("--"),e=function(a){a="--"+a;var b=c.indexOf(a);return-1!==b&&(-1!==d?d>b:!0)};b.exports=function(){return"FORCE_COLOR"in a.env?!0:e("no-color")||e("no-colors")||e("color=false")?!1:e("color")||e("colors")||e("color=true")||e("color=always")?!0:a.stdout&&!a.stdout.isTTY?!1:"win32"===a.platform?!0:"COLORTERM"in a.env?!0:"dumb"===a.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(a.env.TERM)?!0:!1}()}).call(this,a("_process"))},{_process:1}],8:[function(a,b,c){!function(a){function c(a,b){if("object"!==e(a))return b;for(var d in b)"object"===e(a[d])&&"object"===e(b[d])?a[d]=c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,d){var g=d[0],h=d.length;(a||"object"!==e(g))&&(g={});for(var i=0;h>i;++i){var j=d[i],k=e(j);if("object"===k)for(var l in j){var m=a?f.clone(j[l]):j[l];b?g[l]=c(g[l],m):g[l]=m}}return g}function e(a){return{}.toString.call(a).slice(8,-1).toLowerCase()}var f=function(a){return d(a===!0,!1,arguments)},g="merge";f.recursive=function(a){return d(a===!0,!0,arguments)},f.clone=function(a){var b,c,d=a,g=e(a);if("array"===g)for(d=[],c=a.length,b=0;c>b;++b)d[b]=f.clone(a[b]);else if("object"===g){d={};for(b in a)d[b]=f.clone(a[b])}return d},a?b.exports=f:window[g]=f}("object"==typeof b&&b&&"object"==typeof b.exports&&b.exports)},{}],9:[function(a,b,c){"use strict";var d=a("ansi-regex")();b.exports=function(a){return"string"==typeof a?a.replace(d,""):a}},{"ansi-regex":10}],10:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],11:[function(a,b,c){var d=a("strip-ansi"),e=b.exports=function(a,b,c){"object"==typeof a&&(c=a,a=c.start,b=c.stop),"object"==typeof b&&(c=b,a=a||c.start,b=void 0),b||(b=a,a=0),c||(c={});var e=c.mode||"soft",f="hard"===e?/\b/:/(\S+\s+)/;return function(c){var g=c.toString().split(f).reduce(function(c,f){if("hard"===e)for(var g=0;g<d(f).length;g+=b-a)c.push(f.slice(g,g+b-a));else c.push(f);return c},[]);return g.reduce(function(c,e){if(""===e)return c;var f=e.replace(/\t/g," "),g=c.length-1;if(d(c[g]).length+d(f).length>b)c[g]=c[g].replace(/\s+$/,""),f.split(/\n/).forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))});else if(f.match(/\n/)){var h=f.split(/\n/);c[g]+=h.shift(),h.forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))})}else c[g]+=f;return c},[new Array(a+1).join(" ")]).join("\n")}};e.soft=e,e.hard=function(a,b){return e(a,b,{mode:"hard"})}},{"strip-ansi":9}],"tty-table":[function(b,c,d){(function(d){var e=b("merge"),f=b("chalk"),g=b("strip-ansi"),h=b("wordwrap"),j=function(){var b=this._public={},c=this._private={};c.defaults={marginTop:1,marginLeft:2,maxWidth:20,formatter:null,headerAlignment:"center",alignment:"center",paddingRight:0,paddingLeft:0,paddingBottom:0,paddingTop:0,color:!1,headerColor:!1,borderStyle:1,borderCharacters:[[{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "}],[{v:"│",l:"┌",j:"┬",h:"─",r:"┐"},{v:"│",l:"├",j:"┼",h:"─",r:"┤"},{v:"│",l:"└",j:"┴",h:"─",r:"┘"}],[{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"}]]},c.GUTTER=1,c.table={columns:[],columnWidths:[],columnInnerWidths:[],header:[],body:[]},c.buildRow=function(a,d){d=d||{};var e=0,f=a.map(function(a,b){var f=c.buildCell(a,b,d),g=f.cellArr;return d.header&&c.table.columnInnerWidths.push(f.width),e=e<g.length?g.length:e,g});e=d.header?e:e+(b.options.paddingBottom+b.options.paddingTop);var g=Array.apply(null,{length:e}).map(Function.call,function(){return[]});return f.forEach(function(a,f){var h=Array(c.table.columnWidths[f]).join(" ");if(!d.header){for(i=0;i<b.options.paddingTop;i++)a.unshift(h);for(i=0;i<b.options.paddingBottom;i++)a.push(h)}for(var j=0;e>j;j++)g[j].push("undefined"!=typeof a[j]?a[j]:h)}),g},c.buildCell=function(a,d,f){var g;f=f||{},f&&f.header?(a=e(!0,b.options,a),c.table.columns.push(a),g=a.value,columnOptions=a):(columnOptions=c.table.columns[d],"object"==typeof a&&(columnOptions=e(!0,columnOptions,a),a=value),g="function"==typeof columnOptions.formatter?columnOptions.formatter(a):a);var h=c.wrapCellContent(g,d,columnOptions,f&&f.header?"header":"body");return g=h.output,{cellArr:g.split("\n"),width:h.width}},c.colorizeAllWords=function(a,b){var c=b.replace(/(\S+)/gi,function(b){return f[a](b)+" "});return c},c.colorizeLine=function(a,b){return f[a](b)},c.wrapCellContent=function(a,d,e,f){var i=a.toString(),j=c.table.columnWidths[d],k=j-e.paddingLeft-e.paddingRight-c.GUTTER;wrap=h(k),i=wrap(i);var l=i.split("\n");return l=l.map(function(a){switch(!0){case"header"===f:a=e.color||b.options.color?c.colorizeLine(e.headerColor||b.options.color,a):a;break;case"string"==typeof e.color:a=c.colorizeLine(e.color,a);break;case"string"==typeof b.options.color:a=c.colorizeLine(b.options.color,a)}a=Array(e.paddingLeft+1).join(" ")+a+Array(e.paddingRight+1).join(" ");var d=g(a).length,h="header"===f?"headerAlignment":"alignment";if(j>d){var i=j-d;switch(!0){case"center"===e[h]:var k=i%2===0;i=k?i:i-1,i>1&&(a=Array(i/2).join(" ")+a+Array(i/2+(k?1:2)).join(" "));break;case"right"===e[h]:a=Array(i).join(" ")+a;break;default:a+=Array(i).join(" ")}}return a}),i=l.join("\n"),{output:i,width:k}},c.getColumnWidths=function(a){var c=a.map(function(a){return"object"==typeof a&&"undefined"!=typeof a.width?a.width:b.options.maxWidth}),e=c.reduce(function(a,b){return a+b});if(e+=b.options.marginLeft,d&&d.stdout&&e>d.stdout.columns){var f=d.stdout.columns>e;f=f.toFixed(2)-.01,c=c.map(function(a){return Math.floor(f*a)})}return c},b.options={},c.setup=function(a,d,f){return b.options=e(!0,c.defaults,f),c.table.columnWidths=c.getColumnWidths(a),a=[a],c.table.header=a.map(function(a){return c.buildRow(a,{header:!0})}),c.table.body=d.map(function(a){return c.buildRow(a)}),b},b.render=function(){var d="",e=["header","body"],f=Array(b.options.marginLeft+1).join(" "),g=b.options.borderCharacters[b.options.borderStyle],h=[];for(a=0;a<3;a++)h.push(""),c.table.columnWidths.forEach(function(b,c,d){h[a]+=Array(b).join(g[a].h)+(c+1!==d.length?g[a].j:g[a].r)}),h[a]=g[a].l+h[a],h[a]=h[a].split(""),h[a][h[a].length1]=g[a].r,h[a]=h[a].join(""),h[a]=f+h[a]+"\n";return d+=h[0],e.forEach(function(a,b){for(;c.table[a].length;)row=c.table[a].shift(),row.forEach(function(a){d=d+f+g[1].v+a.join(g[1].v)+g[1].v+"\n"}),(1!=b||0!==c.table[a].length)&&(d+=h[1])}),d+=h[2],Array(b.options.marginTop+1).join("\n")+d}};c.exports=function(a,b,c){var d=new j;return d._private.setup(a,b,c)}}).call(this,b("_process"))},{_process:1,chalk:2,merge:8,"strip-ansi":9,wordwrap:11}]},{},[])}({},function(){return this}());
/**
tty-table: Command line table generator.
Version: 1.0.2
Built: 2015-07-07 09:20:41
Version: 1.0.3
Built: 2015-07-07 16:02:15
Author: Tecfu
*/
!function(b,c){c["true"]=b,function(a){if("object"==typeof b&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var d;d="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:this,d.TtyTable=a()}}(function(){return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({"/src/main.js":[function(b,c,d){(function(d){var e=b("merge"),f=b("chalk"),g=b("strip-ansi"),h=b("wordwrap"),j=function(){var b=this._public={},c=this._private={};c.defaults={marginTop:1,marginLeft:2,maxWidth:20,callback:null,headerAlignment:"center",alignment:"center",paddingRight:0,paddingLeft:0,paddingBottom:0,paddingTop:0,color:!1,headerColor:!1,borderStyle:1,borderStyles:[[{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "}],[{v:"│",l:"┌",j:"┬",h:"─",r:"┐"},{v:"│",l:"├",j:"┼",h:"─",r:"┤"},{v:"│",l:"└",j:"┴",h:"─",r:"┘"}],[{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"}]]},c.GUTTER=1,c.table={columns:[],columnWidths:[],columnInnerWidths:[],header:[],body:[]},c.buildRow=function(a,d){d=d||{};var e=0,f=a.map(function(a,b){var f=c.buildCell(a,b,d),g=f.cellArr;return d.header&&c.table.columnInnerWidths.push(f.width),e=e<g.length?g.length:e,g});e=d.header?e:e+(b.options.paddingBottom+b.options.paddingTop);var g=Array.apply(null,{length:e}).map(Function.call,function(){return[]});return f.forEach(function(a,f){var h=Array(c.table.columnWidths[f]).join(" ");if(!d.header){for(i=0;i<b.options.paddingTop;i++)a.unshift(h);for(i=0;i<b.options.paddingBottom;i++)a.push(h)}for(var j=0;e>j;j++)g[j].push("undefined"!=typeof a[j]?a[j]:h)}),g},c.buildCell=function(a,d,f){var g;f=f||{},f&&f.header?(a=e(!0,b.options,a),c.table.columns.push(a),g=a.value,columnOptions=a):(columnOptions=c.table.columns[d],"object"==typeof a&&(columnOptions=e(!0,columnOptions,a),a=value),g="function"==typeof columnOptions.formatter?columnOptions.formatter(a):a);var h=c.wrapCellContent(g,d,columnOptions,f&&f.header?"header":"body");return g=h.output,{cellArr:g.split("\n"),width:h.width}},c.colorizeAllWords=function(a,b){var c=b.replace(/(\S+)/gi,function(b){return f[a](b)+" "});return c},c.colorizeLine=function(a,b){return f[a](b)},c.wrapCellContent=function(a,d,e,f){var i=a.toString(),j=c.table.columnWidths[d],k=j-e.paddingLeft-e.paddingRight-c.GUTTER;wrap=h(k),i=wrap(i);var l=i.split("\n");return l=l.map(function(a){switch(!0){case"header"===f:a=e.color||b.options.color?c.colorizeLine(e.headerColor||b.options.color,a):a;break;case"string"==typeof e.color:a=c.colorizeLine(e.color,a);break;case"string"==typeof b.options.color:a=c.colorizeLine(b.options.color,a)}a=Array(e.paddingLeft+1).join(" ")+a+Array(e.paddingRight+1).join(" ");var d=g(a).length,h="header"===f?"headerAlignment":"alignment";if(j>d){var i=j-d;switch(!0){case"center"===e[h]:var k=i%2===0;i=k?i:i-1,i>1&&(a=Array(i/2).join(" ")+a+Array(i/2+(k?1:2)).join(" "));break;case"right"===e[h]:a=Array(i).join(" ")+a;break;default:a+=Array(i).join(" ")}}return a}),i=l.join("\n"),{output:i,width:k}},c.getColumnWidths=function(a){var c=a.map(function(a){return"object"==typeof a&&"undefined"!=typeof a.width?a.width:b.options.maxWidth}),e=c.reduce(function(a,b){return a+b});if(e+=b.options.marginLeft,d&&d.stdout&&e>d.stdout.columns){var f=d.stdout.columns>e;f=f.toFixed(2)-.01,c=c.map(function(a){return Math.floor(f*a)})}return c},b.options={},c.setup=function(a,d,f){return b.options=e(!0,c.defaults,f),c.table.columnWidths=c.getColumnWidths(a),a=[a],c.table.header=a.map(function(a){return c.buildRow(a,{header:!0})}),c.table.body=d.map(function(a){return c.buildRow(a)}),b},b.render=function(){var d="",e=["header","body"],f=Array(b.options.marginLeft+1).join(" "),g=b.options.borderStyles[b.options.borderStyle],h=[];for(a=0;a<3;a++)h.push(""),c.table.columnWidths.forEach(function(b,c,d){h[a]+=Array(b).join(g[a].h)+(c+1!==d.length?g[a].j:g[a].r)}),h[a]=g[a].l+h[a],h[a]=h[a].split(""),h[a][h[a].length1]=g[a].r,h[a]=h[a].join(""),h[a]=f+h[a]+"\n";return d+=h[0],e.forEach(function(a,b){for(;c.table[a].length;)row=c.table[a].shift(),row.forEach(function(a){d=d+f+g[1].v+a.join(g[1].v)+g[1].v+"\n"}),(1!=b||0!==c.table[a].length)&&(d+=h[1])}),d+=h[2],Array(b.options.marginTop+1).join("\n")+d}};c.exports=function(a,b,c){var d=new j;return d._private.setup(a,b,c)}}).call(this,b("_process"))},{_process:1,chalk:2,merge:8,"strip-ansi":9,wordwrap:11}],1:[function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=b.exports={},g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(a,b,c){(function(c){"use strict";function d(a){this.enabled=a&&void 0!==a.enabled?a.enabled:l}function e(a){var b=function c(){return f.apply(c,arguments)};return b._styles=a,b.enabled=this.enabled,b.__proto__=p,b}function f(){var a=arguments,b=a.length,c=0!==b&&String(arguments[0]);if(b>1)for(var d=1;b>d;d++)c+=" "+a[d];if(!this.enabled||!c)return c;var e=this._styles,f=e.length,g=i.dim.open;for(!n||-1===e.indexOf("gray")&&-1===e.indexOf("grey")||(i.dim.open="");f--;){var h=i[e[f]];c=h.open+c.replace(h.closeRe,h.open)+h.close}return i.dim.open=g,c}function g(){var a={};return Object.keys(o).forEach(function(b){a[b]={get:function(){return e.call(this,[b])}}}),a}var h=a("escape-string-regexp"),i=a("ansi-styles"),j=a("strip-ansi"),k=a("has-ansi"),l=a("supports-color"),m=Object.defineProperties,n="win32"===c.platform&&!/^xterm/i.test(c.env.TERM);n&&(i.blue.open="");var o=function(){var a={};return Object.keys(i).forEach(function(b){i[b].closeRe=new RegExp(h(i[b].close),"g"),a[b]={get:function(){return e.call(this,this._styles.concat(b))}}}),a}(),p=m(function(){},o);m(d.prototype,g()),b.exports=new d,b.exports.styles=i,b.exports.hasColor=k,b.exports.stripColor=j,b.exports.supportsColor=l}).call(this,a("_process"))},{_process:1,"ansi-styles":3,"escape-string-regexp":4,"has-ansi":5,"strip-ansi":9,"supports-color":7}],3:[function(a,b,c){"use strict";function d(){var a={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return a.colors.grey=a.colors.gray,Object.keys(a).forEach(function(b){var c=a[b];Object.keys(c).forEach(function(b){var d=c[b];a[b]=c[b]={open:"["+d[0]+"m",close:"["+d[1]+"m"}}),Object.defineProperty(a,b,{value:c,enumerable:!1})}),a}Object.defineProperty(b,"exports",{enumerable:!0,get:d})},{}],4:[function(a,b,c){"use strict";var d=/[|\\{}()[\]^$+*?.]/g;b.exports=function(a){if("string"!=typeof a)throw new TypeError("Expected a string");return a.replace(d,"\\$&")}},{}],5:[function(a,b,c){"use strict";var d=a("ansi-regex"),e=new RegExp(d().source);b.exports=e.test.bind(e)},{"ansi-regex":6}],6:[function(a,b,c){"use strict";b.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],7:[function(a,b,c){(function(a){"use strict";var c=a.argv,d=c.indexOf("--"),e=function(a){a="--"+a;var b=c.indexOf(a);return-1!==b&&(-1!==d?d>b:!0)};b.exports=function(){return"FORCE_COLOR"in a.env?!0:e("no-color")||e("no-colors")||e("color=false")?!1:e("color")||e("colors")||e("color=true")||e("color=always")?!0:a.stdout&&!a.stdout.isTTY?!1:"win32"===a.platform?!0:"COLORTERM"in a.env?!0:"dumb"===a.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(a.env.TERM)?!0:!1}()}).call(this,a("_process"))},{_process:1}],8:[function(a,b,c){!function(a){function c(a,b){if("object"!==e(a))return b;for(var d in b)"object"===e(a[d])&&"object"===e(b[d])?a[d]=c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,d){var g=d[0],h=d.length;(a||"object"!==e(g))&&(g={});for(var i=0;h>i;++i){var j=d[i],k=e(j);if("object"===k)for(var l in j){var m=a?f.clone(j[l]):j[l];b?g[l]=c(g[l],m):g[l]=m}}return g}function e(a){return{}.toString.call(a).slice(8,-1).toLowerCase()}var f=function(a){return d(a===!0,!1,arguments)},g="merge";f.recursive=function(a){return d(a===!0,!0,arguments)},f.clone=function(a){var b,c,d=a,g=e(a);if("array"===g)for(d=[],c=a.length,b=0;c>b;++b)d[b]=f.clone(a[b]);else if("object"===g){d={};for(b in a)d[b]=f.clone(a[b])}return d},a?b.exports=f:window[g]=f}("object"==typeof b&&b&&"object"==typeof b.exports&&b.exports)},{}],9:[function(a,b,c){"use strict";var d=a("ansi-regex")();b.exports=function(a){return"string"==typeof a?a.replace(d,""):a}},{"ansi-regex":10}],10:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],11:[function(a,b,c){var d=a("strip-ansi"),e=b.exports=function(a,b,c){"object"==typeof a&&(c=a,a=c.start,b=c.stop),"object"==typeof b&&(c=b,a=a||c.start,b=void 0),b||(b=a,a=0),c||(c={});var e=c.mode||"soft",f="hard"===e?/\b/:/(\S+\s+)/;return function(c){var g=c.toString().split(f).reduce(function(c,f){if("hard"===e)for(var g=0;g<d(f).length;g+=b-a)c.push(f.slice(g,g+b-a));else c.push(f);return c},[]);return g.reduce(function(c,e){if(""===e)return c;var f=e.replace(/\t/g," "),g=c.length-1;if(d(c[g]).length+d(f).length>b)c[g]=c[g].replace(/\s+$/,""),f.split(/\n/).forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))});else if(f.match(/\n/)){var h=f.split(/\n/);c[g]+=h.shift(),h.forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))})}else c[g]+=f;return c},[new Array(a+1).join(" ")]).join("\n")}};e.soft=e,e.hard=function(a,b){return e(a,b,{mode:"hard"})}},{"strip-ansi":9}]},{},[])("/src/main.js")})}({},function(){return this}());
!function(b,c){c["true"]=b,function(a){if("object"==typeof b&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var d;d="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:this,d.TtyTable=a()}}(function(){return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({"/src/main.js":[function(b,c,d){(function(d){var e=b("merge"),f=b("chalk"),g=b("strip-ansi"),h=b("wordwrap"),j=function(){var b=this._public={},c=this._private={};c.defaults={marginTop:1,marginLeft:2,maxWidth:20,formatter:null,headerAlignment:"center",alignment:"center",paddingRight:0,paddingLeft:0,paddingBottom:0,paddingTop:0,color:!1,headerColor:!1,borderStyle:1,borderCharacters:[[{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "},{v:" ",l:" ",j:" ",h:" ",r:" "}],[{v:"│",l:"┌",j:"┬",h:"─",r:"┐"},{v:"│",l:"├",j:"┼",h:"─",r:"┤"},{v:"│",l:"└",j:"┴",h:"─",r:"┘"}],[{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"},{v:"|",l:"+",j:"+",h:"-",r:"+"}]]},c.GUTTER=1,c.table={columns:[],columnWidths:[],columnInnerWidths:[],header:[],body:[]},c.buildRow=function(a,d){d=d||{};var e=0,f=a.map(function(a,b){var f=c.buildCell(a,b,d),g=f.cellArr;return d.header&&c.table.columnInnerWidths.push(f.width),e=e<g.length?g.length:e,g});e=d.header?e:e+(b.options.paddingBottom+b.options.paddingTop);var g=Array.apply(null,{length:e}).map(Function.call,function(){return[]});return f.forEach(function(a,f){var h=Array(c.table.columnWidths[f]).join(" ");if(!d.header){for(i=0;i<b.options.paddingTop;i++)a.unshift(h);for(i=0;i<b.options.paddingBottom;i++)a.push(h)}for(var j=0;e>j;j++)g[j].push("undefined"!=typeof a[j]?a[j]:h)}),g},c.buildCell=function(a,d,f){var g;f=f||{},f&&f.header?(a=e(!0,b.options,a),c.table.columns.push(a),g=a.value,columnOptions=a):(columnOptions=c.table.columns[d],"object"==typeof a&&(columnOptions=e(!0,columnOptions,a),a=value),g="function"==typeof columnOptions.formatter?columnOptions.formatter(a):a);var h=c.wrapCellContent(g,d,columnOptions,f&&f.header?"header":"body");return g=h.output,{cellArr:g.split("\n"),width:h.width}},c.colorizeAllWords=function(a,b){var c=b.replace(/(\S+)/gi,function(b){return f[a](b)+" "});return c},c.colorizeLine=function(a,b){return f[a](b)},c.wrapCellContent=function(a,d,e,f){var i=a.toString(),j=c.table.columnWidths[d],k=j-e.paddingLeft-e.paddingRight-c.GUTTER;wrap=h(k),i=wrap(i);var l=i.split("\n");return l=l.map(function(a){switch(!0){case"header"===f:a=e.color||b.options.color?c.colorizeLine(e.headerColor||b.options.color,a):a;break;case"string"==typeof e.color:a=c.colorizeLine(e.color,a);break;case"string"==typeof b.options.color:a=c.colorizeLine(b.options.color,a)}a=Array(e.paddingLeft+1).join(" ")+a+Array(e.paddingRight+1).join(" ");var d=g(a).length,h="header"===f?"headerAlignment":"alignment";if(j>d){var i=j-d;switch(!0){case"center"===e[h]:var k=i%2===0;i=k?i:i-1,i>1&&(a=Array(i/2).join(" ")+a+Array(i/2+(k?1:2)).join(" "));break;case"right"===e[h]:a=Array(i).join(" ")+a;break;default:a+=Array(i).join(" ")}}return a}),i=l.join("\n"),{output:i,width:k}},c.getColumnWidths=function(a){var c=a.map(function(a){return"object"==typeof a&&"undefined"!=typeof a.width?a.width:b.options.maxWidth}),e=c.reduce(function(a,b){return a+b});if(e+=b.options.marginLeft,d&&d.stdout&&e>d.stdout.columns){var f=d.stdout.columns>e;f=f.toFixed(2)-.01,c=c.map(function(a){return Math.floor(f*a)})}return c},b.options={},c.setup=function(a,d,f){return b.options=e(!0,c.defaults,f),c.table.columnWidths=c.getColumnWidths(a),a=[a],c.table.header=a.map(function(a){return c.buildRow(a,{header:!0})}),c.table.body=d.map(function(a){return c.buildRow(a)}),b},b.render=function(){var d="",e=["header","body"],f=Array(b.options.marginLeft+1).join(" "),g=b.options.borderCharacters[b.options.borderStyle],h=[];for(a=0;a<3;a++)h.push(""),c.table.columnWidths.forEach(function(b,c,d){h[a]+=Array(b).join(g[a].h)+(c+1!==d.length?g[a].j:g[a].r)}),h[a]=g[a].l+h[a],h[a]=h[a].split(""),h[a][h[a].length1]=g[a].r,h[a]=h[a].join(""),h[a]=f+h[a]+"\n";return d+=h[0],e.forEach(function(a,b){for(;c.table[a].length;)row=c.table[a].shift(),row.forEach(function(a){d=d+f+g[1].v+a.join(g[1].v)+g[1].v+"\n"}),(1!=b||0!==c.table[a].length)&&(d+=h[1])}),d+=h[2],Array(b.options.marginTop+1).join("\n")+d}};c.exports=function(a,b,c){var d=new j;return d._private.setup(a,b,c)}}).call(this,b("_process"))},{_process:1,chalk:2,merge:8,"strip-ansi":9,wordwrap:11}],1:[function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=b.exports={},g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],2:[function(a,b,c){(function(c){"use strict";function d(a){this.enabled=a&&void 0!==a.enabled?a.enabled:l}function e(a){var b=function c(){return f.apply(c,arguments)};return b._styles=a,b.enabled=this.enabled,b.__proto__=p,b}function f(){var a=arguments,b=a.length,c=0!==b&&String(arguments[0]);if(b>1)for(var d=1;b>d;d++)c+=" "+a[d];if(!this.enabled||!c)return c;var e=this._styles,f=e.length,g=i.dim.open;for(!n||-1===e.indexOf("gray")&&-1===e.indexOf("grey")||(i.dim.open="");f--;){var h=i[e[f]];c=h.open+c.replace(h.closeRe,h.open)+h.close}return i.dim.open=g,c}function g(){var a={};return Object.keys(o).forEach(function(b){a[b]={get:function(){return e.call(this,[b])}}}),a}var h=a("escape-string-regexp"),i=a("ansi-styles"),j=a("strip-ansi"),k=a("has-ansi"),l=a("supports-color"),m=Object.defineProperties,n="win32"===c.platform&&!/^xterm/i.test(c.env.TERM);n&&(i.blue.open="");var o=function(){var a={};return Object.keys(i).forEach(function(b){i[b].closeRe=new RegExp(h(i[b].close),"g"),a[b]={get:function(){return e.call(this,this._styles.concat(b))}}}),a}(),p=m(function(){},o);m(d.prototype,g()),b.exports=new d,b.exports.styles=i,b.exports.hasColor=k,b.exports.stripColor=j,b.exports.supportsColor=l}).call(this,a("_process"))},{_process:1,"ansi-styles":3,"escape-string-regexp":4,"has-ansi":5,"strip-ansi":9,"supports-color":7}],3:[function(a,b,c){"use strict";function d(){var a={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return a.colors.grey=a.colors.gray,Object.keys(a).forEach(function(b){var c=a[b];Object.keys(c).forEach(function(b){var d=c[b];a[b]=c[b]={open:"["+d[0]+"m",close:"["+d[1]+"m"}}),Object.defineProperty(a,b,{value:c,enumerable:!1})}),a}Object.defineProperty(b,"exports",{enumerable:!0,get:d})},{}],4:[function(a,b,c){"use strict";var d=/[|\\{}()[\]^$+*?.]/g;b.exports=function(a){if("string"!=typeof a)throw new TypeError("Expected a string");return a.replace(d,"\\$&")}},{}],5:[function(a,b,c){"use strict";var d=a("ansi-regex"),e=new RegExp(d().source);b.exports=e.test.bind(e)},{"ansi-regex":6}],6:[function(a,b,c){"use strict";b.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],7:[function(a,b,c){(function(a){"use strict";var c=a.argv,d=c.indexOf("--"),e=function(a){a="--"+a;var b=c.indexOf(a);return-1!==b&&(-1!==d?d>b:!0)};b.exports=function(){return"FORCE_COLOR"in a.env?!0:e("no-color")||e("no-colors")||e("color=false")?!1:e("color")||e("colors")||e("color=true")||e("color=always")?!0:a.stdout&&!a.stdout.isTTY?!1:"win32"===a.platform?!0:"COLORTERM"in a.env?!0:"dumb"===a.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(a.env.TERM)?!0:!1}()}).call(this,a("_process"))},{_process:1}],8:[function(a,b,c){!function(a){function c(a,b){if("object"!==e(a))return b;for(var d in b)"object"===e(a[d])&&"object"===e(b[d])?a[d]=c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,d){var g=d[0],h=d.length;(a||"object"!==e(g))&&(g={});for(var i=0;h>i;++i){var j=d[i],k=e(j);if("object"===k)for(var l in j){var m=a?f.clone(j[l]):j[l];b?g[l]=c(g[l],m):g[l]=m}}return g}function e(a){return{}.toString.call(a).slice(8,-1).toLowerCase()}var f=function(a){return d(a===!0,!1,arguments)},g="merge";f.recursive=function(a){return d(a===!0,!0,arguments)},f.clone=function(a){var b,c,d=a,g=e(a);if("array"===g)for(d=[],c=a.length,b=0;c>b;++b)d[b]=f.clone(a[b]);else if("object"===g){d={};for(b in a)d[b]=f.clone(a[b])}return d},a?b.exports=f:window[g]=f}("object"==typeof b&&b&&"object"==typeof b.exports&&b.exports)},{}],9:[function(a,b,c){"use strict";var d=a("ansi-regex")();b.exports=function(a){return"string"==typeof a?a.replace(d,""):a}},{"ansi-regex":10}],10:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],11:[function(a,b,c){var d=a("strip-ansi"),e=b.exports=function(a,b,c){"object"==typeof a&&(c=a,a=c.start,b=c.stop),"object"==typeof b&&(c=b,a=a||c.start,b=void 0),b||(b=a,a=0),c||(c={});var e=c.mode||"soft",f="hard"===e?/\b/:/(\S+\s+)/;return function(c){var g=c.toString().split(f).reduce(function(c,f){if("hard"===e)for(var g=0;g<d(f).length;g+=b-a)c.push(f.slice(g,g+b-a));else c.push(f);return c},[]);return g.reduce(function(c,e){if(""===e)return c;var f=e.replace(/\t/g," "),g=c.length-1;if(d(c[g]).length+d(f).length>b)c[g]=c[g].replace(/\s+$/,""),f.split(/\n/).forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))});else if(f.match(/\n/)){var h=f.split(/\n/);c[g]+=h.shift(),h.forEach(function(b){c.push(new Array(a+1).join(" ")+b.replace(/^\s+/,""))})}else c[g]+=f;return c},[new Array(a+1).join(" ")]).join("\n")}};e.soft=e,e.hard=function(a,b){return e(a,b,{mode:"hard"})}},{"strip-ansi":9}]},{},[])("/src/main.js")})}({},function(){return this}());
{
"name": "tty-table",
"version": "1.0.3",
"version": "1.0.4",
"description": "Command line table generator.",

@@ -18,3 +18,5 @@ "main": "src/main.js",

"console table",
"cli table"
"cli table",
"console.table",
"ascii table"
],

@@ -21,0 +23,0 @@ "author": "Tecfu",

@@ -132,17 +132,19 @@ # tty-table

| header | <code>array</code> | |
| header.column | <code>object</code> | |
| header.column.formatter | <code>function</code> | Runs a callback on each cell value in the parent column |
| header.column.marginLeft | <code>number</code> | default: 0 |
| header.column.marginTop | <code>number</code> | default: 0 |
| header.column.maxWidth | <code>number</code> | default: 20 |
| header.column.paddingBottom | <code>number</code> | default: 0 |
| header.column.paddingLeft | <code>number</code> | default: 0 |
| header.column.paddingRight | <code>number</code> | default: 0 |
| header.column.paddingTop | <code>number</code> | default: 0 |
| header.column.alignment | <code>string</code> | default: "center" |
| header.column.color | <code>string</code> | default: terminal default color |
| header.column.headerAlignment | <code>string</code> | default: "center" |
| header.column.headerColor | <code>string</code> | default: terminal default color |
| rows | <code>array</code> | |
| options | <code>object</code> | Table options |
| options.marginTop | <code>number</code> | default: 0 |
| options.marginLeft | <code>number</code> | default: 0 |
| options.maxWidth | <code>number</code> | default: 20 |
| options.callback | <code>function</code> | default: null |
| options.headerAlignment | <code>string</code> | default: "center" |
| options.alignment | <code>string</code> | default: "center" |
| options.paddingRight | <code>number</code> | default: 0 |
| options.paddingLeft | <code>number</code> | default: 0 |
| options.paddingBottom | <code>number</code> | default: 0 |
| options.paddingTop | <code>number</code> | default: 0 |
| options.color | <code>string</code> | default: terminal default color |
| options.headerColor | <code>string</code> | default: terminal default color |
| options.borderStyles | <code>number</code> | default: 1 (0 = no border) |
| options.borderStyle | <code>number</code> | default: 1 (0 = no border) Refers to the index of the desired character set. |
| options.borderCharacters | <code>array</code> | |

@@ -149,0 +151,0 @@ **Example**

@@ -24,3 +24,3 @@ var merge = require("merge"),

maxWidth : 20,
callback : null,
formatter : null,
headerAlignment : "center",

@@ -35,3 +35,3 @@ alignment : "center",

borderStyle : 1,
borderStyles : [
borderCharacters : [
[

@@ -325,3 +325,3 @@ {v: " ", l: " ", j: " ", h: " ", r: " "},

marginLeft = Array(_public.options.marginLeft + 1).join('\ '),
bS = _public.options.borderStyles[_public.options.borderStyle],
bS = _public.options.borderCharacters[_public.options.borderStyle],
borders = [];

@@ -378,17 +378,22 @@

* @param {array} header
* @param {object} header.column
* @param {function} header.column.formatter - Runs a callback on each cell value in the parent column
* @param {number} header.column.marginLeft - default: 0
* @param {number} header.column.marginTop - default: 0
* @param {number} header.column.maxWidth - default: 20
* @param {number} header.column.paddingBottom - default: 0
* @param {number} header.column.paddingLeft - default: 0
* @param {number} header.column.paddingRight - default: 0
* @param {number} header.column.paddingTop - default: 0
* @param {string} header.column.alignment - default: "center"
* @param {string} header.column.color - default: terminal default color
* @param {string} header.column.headerAlignment - default: "center"
* @param {string} header.column.headerColor - default: terminal default color
*
* @param {array} rows
* @param {object} options - Table options
* @param {number} options.marginTop - default: 0
* @param {number} options.marginLeft - default: 0
* @param {number} options.maxWidth - default: 20
* @param {function} options.callback - default: null
* @param {string} options.headerAlignment - default: "center"
* @param {string} options.alignment - default: "center"
* @param {number} options.paddingRight - default: 0
* @param {number} options.paddingLeft - default: 0
* @param {number} options.paddingBottom - default: 0
* @param {number} options.paddingTop - default: 0
* @param {string} options.color - default: terminal default color
* @param {string} options.headerColor - default: terminal default color
* @param {number} options.borderStyles - default: 1 (0 = no border)
*
* @param {object} options - Table options
* @param {number} options.borderStyle - default: 1 (0 = no border)
* Refers to the index of the desired character set.
* @param {array} options.borderCharacters
* @returns {Table}

@@ -395,0 +400,0 @@ * @example

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc