Socket
Socket
Sign inDemoInstall

cliff

Package Overview
Dependencies
8
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.8 to 0.1.9

21

lib/cliff.js

@@ -110,8 +110,11 @@ /*

//
cliff.stringifyRows = function (rows, colors) {
cliff.stringifyRows = function (rows, colors, options) {
var lengths, columns, output = [], headers;
options = options || {};
options.columnSpacing = options.columnSpacing || 2;
columns = cliff.columnMajor(rows);
lengths = cliff.arrayLengths(columns);
function stringifyRow(row, colorize) {

@@ -121,5 +124,9 @@ var rowtext = '', padding, item, i, length;

item = cliff.stringifyLiteral(row[i]);
item = colorize ? item[colors[i]] : item;
if(colorize) {
item = item[colors[i]] || item[colors[colors.length -1]] || item;
}
length = realLength(item);
padding = length < lengths[i] ? lengths[i] - length + 2 : 2;
padding = length < lengths[i] ? lengths[i] - length + options.columnSpacing : options.columnSpacing ;
rowtext += item + new Array(padding).join(' ');

@@ -153,3 +160,3 @@ }

//
cliff.stringifyObjectRows = cliff.rowifyObjects = function (objs, properties, colors) {
cliff.stringifyObjectRows = cliff.rowifyObjects = function (objs, properties, colors, options) {
var rows = [properties].concat(objs.map(function (obj) {

@@ -159,3 +166,3 @@ return cliff.extractFrom(obj, properties);

return cliff.stringifyRows(rows, colors);
return cliff.stringifyRows(rows, colors, options);
};

@@ -162,0 +169,0 @@

{
"name": "cliff",
"description": "Your CLI formatting friend.",
"version": "0.1.8",
"version": "0.1.9",
"author": "Nodejitsu Inc. <info@nodejitsu.com>",

@@ -22,6 +22,6 @@ "repository": {

"eyes": "0.1.x",
"winston": "0.6.x"
"winston": "0.8.x"
},
"devDependencies": {
"vows": "0.5.x"
"vows": "0.7.x"
},

@@ -28,0 +28,0 @@ "main": "./lib/cliff",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc