speak-softly
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "speak-softly", | ||
"version": "1.2.1", | ||
"description": "", | ||
"version": "1.2.2", | ||
"description": "A little something something to make readable console logging easier", | ||
"main": "SoftSpoken.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -36,3 +36,3 @@ # SPEAK-SOFTLY | ||
## License | ||
Copyright (c) 2015 Wybe Minnebo | ||
Copyright (c) 2018 | ||
@@ -39,0 +39,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
@@ -272,4 +272,7 @@ 'use strict'; | ||
if(cell.length > columnSizes[colIndex]) | ||
columnSizes[colIndex] = cell.length; | ||
let cellLength = cell.length; | ||
if(cell.includes('\n')) | ||
cellLength = cell.split('\n').reduce((max, line) => Math.max(max, line.length), 0); | ||
if(cellLength > columnSizes[colIndex]) | ||
columnSizes[colIndex] = cellLength; | ||
@@ -304,3 +307,3 @@ return cell.trim(); | ||
table.toString() | ||
.split(os.EOL) | ||
.split('\n') | ||
.map(line => getLeftIndentationString(this.config.indentation, this.indentationLevel) + line) | ||
@@ -307,0 +310,0 @@ .forEach(line => { |
446
17107
6