New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

2table

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

2table - npm Package Compare versions

Comparing version
0.2.8
to
0.2.9
+3
-3
executable.js

@@ -27,3 +27,3 @@ #!/usr/bin/env node

} catch (e) {
console.error("Invalid JSON input");
console.error("Invalid JSON input:", e.message);
process.exit(1);

@@ -37,3 +37,3 @@ }

} catch (e) {
console.error("Error parsing the data");
console.error("Error parsing the data:", e.message);
process.exit(2);

@@ -46,5 +46,5 @@ }

} catch (e) {
console.error("cannot print the table");
console.error("cannot print the table:", e.message);
process.exit(3);
}
})();

@@ -15,3 +15,3 @@ const { length } = require("./Utils");

structure.forEach(structureItem => {
const value = data[structureItem.field];
const value = structureItem.extractor(data[structureItem.field]);

@@ -25,3 +25,3 @@ if (structureItem.group) {

} else {
item[structureItem.key] = structureItem.extractor(value);
item[structureItem.key] = value;
}

@@ -28,0 +28,0 @@

@@ -123,2 +123,4 @@ const colors = require("colors");

formattedValue = moment(formattedValue).format();
} else if (typeof formattedValue === "boolean") {
formattedValue = formattedValue ? "true" : "false";
} else if (typeof formattedValue === "number") {

@@ -129,2 +131,6 @@ formattedValue = `${formattedValue}`;

formattedValue = formattedValue.join("\n");
} else if (typeof formattedValue === "object") {
formattedValue = Object.entries(formattedValue)
.map(([key, value]) => `${key}: ${value}`)
.join(", ");
}

@@ -131,0 +137,0 @@

{
"name": "2table",
"version": "0.2.8",
"version": "0.2.9",
"description": "Convert JSON to ASCII Table",

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