mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 18:52:50 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
23
node_modules/cli-color/columns.js
generated
vendored
Normal file
23
node_modules/cli-color/columns.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var from = require('es5-ext/array/from')
|
||||
, iterable = require('es5-ext/iterable/validate-object')
|
||||
, stringifiable = require('es5-ext/object/validate-stringifiable')
|
||||
, pad = require('es5-ext/string/#/pad');
|
||||
|
||||
module.exports = function (rows/*, options*/) {
|
||||
var options = Object(arguments[1]), cols = [];
|
||||
return from(iterable(rows), function (row, index) {
|
||||
return from(iterable(row), function (str, index) {
|
||||
var col = cols[index];
|
||||
if (!col) col = cols[index] = { width: 0 };
|
||||
str = stringifiable(str);
|
||||
if (str.length > col.width) col.width = str.length;
|
||||
return str;
|
||||
});
|
||||
}).map(function (row) {
|
||||
return row.map(function (item, index) {
|
||||
return pad.call(item, ' ', -cols[index].width);
|
||||
}).join((options.sep == null) ? ' | ' : options.sep);
|
||||
}).join('\n') + '\n';
|
||||
};
|
||||
Reference in New Issue
Block a user