console-table-printer
Advanced tools
Comparing version 1.0.0-beta7 to 1.0.0-beta8
{ | ||
"name": "console-table-printer", | ||
"version": "1.0.0-beta7", | ||
"version": "1.0.0-beta8", | ||
"repository": "github:ayonious/console-table-printer", | ||
@@ -5,0 +5,0 @@ "description": "Printing pretty tables on console log", |
@@ -56,3 +56,3 @@ # Print Pretty tables on Your Console | ||
Documentation | ||
## Documentation | ||
@@ -99,18 +99,17 @@ ### Table instance creation | ||
Example usage: To Create a row of color blue | ||
```js | ||
table.addRow(rowObject, {color: 'blue'}); | ||
``` | ||
### possible border Style of table | ||
thinBorder | ||
┌────────────┬─────┬──────┐ | ||
│ foo │ bar │ baz │ | ||
├────────────┼─────┼──────┤ | ||
│ frobnicate │ bar │ quuz │ | ||
└────────────┴─────┴──────┘ | ||
* thinBorder | ||
fatBorder: | ||
╔══════╦═════╦══════╗ | ||
║ hob ║ foo ║ mia ║ | ||
╟══════╬═════╬══════╢ | ||
║ ball ║ fox ║ mama ║ | ||
╚══════╩═════╩══════╝ | ||
![Screenshot](https://cdn.jsdelivr.net/gh/ayonious/console-table-printer@master/static-resources/screenshot-thin-border.png) | ||
* fatBorder: | ||
![Screenshot](https://cdn.jsdelivr.net/gh/ayonious/console-table-printer@master/static-resources/screenshot-fat-border.png) | ||
Example for creating fat border Table `new Table({style: 'fatBorder'});` | ||
@@ -117,0 +116,0 @@ |
@@ -25,3 +25,3 @@ const {TABLE_STYLE} = require('./table-constants'); | ||
this.tableStyle = TABLE_STYLE[options.style || 'thinBorder']; | ||
this.columns = options.columns.map( column => ( | ||
this.columns = options.columns && options.columns.map( column => ( | ||
{ | ||
@@ -31,3 +31,3 @@ name: column.name, | ||
}) | ||
); | ||
) || []; | ||
} | ||
@@ -34,0 +34,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13459
118