tableify
Advanced tools
Comparing version 1.0.0 to 1.0.1
14
index.js
@@ -54,3 +54,3 @@ "use strict"; | ||
cols = []; | ||
obj.forEach(function (val, ix) { | ||
@@ -60,6 +60,6 @@ cols.push(ix); | ||
}); | ||
buf.push('</tbody>','</table>'); | ||
} | ||
} | ||
@@ -101,6 +101,6 @@ else if (obj && typeof obj === 'object' && !Array.isArray(obj) && !(obj instanceof Date)) { | ||
function getClass(obj) { | ||
return ' class="' | ||
+ ((obj && obj.constructor) | ||
? obj.constructor.name | ||
: typeof obj | ||
return ' class="' | ||
+ ((obj && obj.constructor && obj.constructor.name) | ||
? obj.constructor.name | ||
: typeof obj || '' | ||
).toLowerCase() | ||
@@ -107,0 +107,0 @@ + ((obj === null) |
{ | ||
"name": "tableify", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Create HTML tables from Javascript Objects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
9506