Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terminal-table

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terminal-table - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

test/insertColumn.js

28

index.js

@@ -231,6 +231,32 @@ var eaw = require("eastasianwidth");

this.init(row, column);
this.table[row][column].text = text;
this.table[row][column].text = text + "";
};
Table.prototype.insertRow = function(rowIndex, items){
if(this.table[rowIndex]){
this.table.splice(rowIndex, 0, []);
}
for(var i = 0, l = items.length;i < l;i++){
this.cell(rowIndex, i, items[i] || "");
}
};
Table.prototype.insertColumn = function(columnIndex, items){
var l = Math.max(this.table.length, items.length);
for(var i = 0;i < l;i++){
if(!this.table[i]){
this.table[i] = [];
}
else{
this.table[i].splice(columnIndex, 0, "");
}
if(items[i]){
this.cell(i, columnIndex, items[i]);
}
}
};
Table.prototype.removeCell = function(row, column){

@@ -237,0 +263,0 @@ this.init(row, column);

2

package.json
{
"name": "terminal-table",
"version": "0.0.9",
"version": "0.0.10",
"description": "View a table in the terminal.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -70,2 +70,4 @@ terminal-table

- cell(row, column, text)
- insertRow(rowIndex, ["item", ...])
- insertColumn(columnIndex, ["item", ...])
- attr(row, column, { attrs })

@@ -72,0 +74,0 @@ - __attrs__

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