Comparing version 1.0.7 to 1.0.8
@@ -63,3 +63,3 @@ "use strict"; | ||
const colNames = [...new Set (arr.map (O.keys).reduce ((a, b) => [...a, ...b]))], | ||
const colNames = [...new Set (arr.map (O.keys).reduce ((a, b) => [...a, ...b], []))], | ||
columns = [colNames, ...arr.map (o => colNames.map (key => o[key]))], | ||
@@ -66,0 +66,0 @@ lines = asColumns (columns, O.assign ({ minColumnWidths: colNames.map (n => n.length) }, cfg)) |
{ | ||
"name": "as-table", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A simple function to print objects as ASCII tables", | ||
"main": "as-table.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/supervisor -n exit -x ./node_modules/.bin/mocha -- --reporter spec" | ||
"test": "./node_modules/.bin/mocha --reporter spec --watch" | ||
}, | ||
@@ -27,5 +27,4 @@ "repository": { | ||
"devDependencies": { | ||
"mocha": "^2.4.5", | ||
"supervisor": "^0.11.0" | ||
"mocha": "^2.4.5" | ||
} | ||
} |
12
test.js
"use strict"; | ||
const assert = require ('assert'), | ||
asTable = require ('as-table') | ||
asTable = require ('./as-table') | ||
@@ -57,2 +57,10 @@ describe ('as-table', () => { | ||
}) | ||
}) | ||
it ('degenerate case works', () => { | ||
assert.equal (asTable ([]), '\n') | ||
}) | ||
}) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8000
1
90