From 3adc4e4eaaa2064fbc1fe876f5921334fba1a8ea Mon Sep 17 00:00:00 2001
From: Carlos Gonzalez <36900563+cgonzalezp91@users.noreply.github.com>
Date: Mon, 16 Jul 2018 15:16:10 -0500
Subject: [PATCH 1/3] Add Border option to table
Sending the border: 1 to the config to pint the table with border.
Default is null.
`const html = tableify(data, {border: '1'})`
---
index.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index c96d7c1..69af749 100644
--- a/index.js
+++ b/index.js
@@ -7,7 +7,8 @@ const pretty = require('pretty');
const DEFAULT_CONFIG = {
tidy: true,
- headers: null
+ headers: null,
+ border: null
};
module.exports = (data, config) => {
@@ -27,6 +28,6 @@ module.exports = (data, config) => {
return `
${$tds.join('')}
`;
});
let $body = `${$rows.join('')}`;
- let rst = ``;
+ let rst = ``;
return config.tidy ? pretty(rst) : rst;
};
From 05e5a1b688b9f3cb2160a11526005fb33e41ff37 Mon Sep 17 00:00:00 2001
From: Carlos Gonzalez <36900563+cgonzalezp91@users.noreply.github.com>
Date: Tue, 24 Jul 2018 11:49:39 -0500
Subject: [PATCH 2/3] Testing
Makes some changes for the testing
---
index.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index 69af749..a832973 100644
--- a/index.js
+++ b/index.js
@@ -28,6 +28,7 @@ module.exports = (data, config) => {
return `${$tds.join('')}
`;
});
let $body = `${$rows.join('')}`;
- let rst = ``;
+ if (config.border) let rst = ``;
+ else let let rst = ``;
return config.tidy ? pretty(rst) : rst;
};
From d92c299ccb0eaf7304657b5390528accc4968ae1 Mon Sep 17 00:00:00 2001
From: Carlos Gonzalez <36900563+cgonzalezp91@users.noreply.github.com>
Date: Tue, 24 Jul 2018 11:56:56 -0500
Subject: [PATCH 3/3] Testing
---
index.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index a832973..69f622e 100644
--- a/index.js
+++ b/index.js
@@ -28,7 +28,8 @@ module.exports = (data, config) => {
return `${$tds.join('')}
`;
});
let $body = `${$rows.join('')}`;
- if (config.border) let rst = ``;
- else let let rst = ``;
+ let rst;
+ if (config.border) {rst = ``;}
+ else {rst = ``;}
return config.tidy ? pretty(rst) : rst;
};