aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-01-26 14:32:14 -0500
committerBobby <[email protected]>2022-01-26 14:32:14 -0500
commit71a47064e453e59973dfc67be1915a4395c97bec (patch)
treeb06d16c5211167aed5c27def0844e41215b9e6f1
parent441083bfe0b88073bc2745ef0d84dbeb6902b854 (diff)
downloadizuku.js-71a47064e453e59973dfc67be1915a4395c97bec.tar.xz
izuku.js-71a47064e453e59973dfc67be1915a4395c97bec.zip
fix: fix tests
-rw-r--r--src/index.ts4
-rw-r--r--src/lib/info.ts5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/index.ts b/src/index.ts
index 99482be..394fe93 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -21,7 +21,7 @@ class Izuku {
constructor(
rowdata?: Array<unknown[]>,
columns?: Array<string>,
- title?: string
+ tableTitle?: string
) {
this.rowdata = rowdata || [];
this.columns = columns
@@ -29,7 +29,7 @@ class Izuku {
: generateHeader(this.rowdata);
this.size = getSize(this.rowdata);
this.shape = `${this.rowdata.length} x ${this.columns.length}`;
- this.tableTitle = title || '';
+ this.tableTitle = tableTitle || '';
}
public data = data;
diff --git a/src/lib/info.ts b/src/lib/info.ts
index 98a6249..f194ebc 100644
--- a/src/lib/info.ts
+++ b/src/lib/info.ts
@@ -74,7 +74,10 @@ export function info(this: Frame): void {
.split(' x ')[1]
.trim()} columns`
);
- displayTable(info);
+ displayTable({
+ data: info,
+ title: this.tableTitle
+ });
console.log(`Data Types: ${dataTypesString}`);
console.log(`Memory Usage: ${sizeof(this)} bytes`);
}