Comparing version 2.0.0 to 2.0.1
@@ -55,4 +55,4 @@ const statistics = require('statistics'); | ||
function result (timings, key) { | ||
const results = timings.map(t => t[key]).filter(t => t); | ||
const stats = results.length ? results.reduce(statistics) : {}; | ||
const results = timings.map(t => t[key]).filter(t => typeof t === 'number'); | ||
const stats = results.length > 1 ? results.reduce(statistics) : { mean: results[0], stdev: 0 }; | ||
return { | ||
@@ -59,0 +59,0 @@ mean: stats.mean, |
{ | ||
"name": "timeliner", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Automated Browser Timeline Analyser", | ||
@@ -8,3 +8,5 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "semistandard && semistandard bin/timeliner" | ||
"test:lint": "semistandard && semistandard bin/timeliner", | ||
"test:unit": "mocha test --recursive", | ||
"test": "npm run test:lint && npm run test:unit" | ||
}, | ||
@@ -37,4 +39,5 @@ "repository": { | ||
"devDependencies": { | ||
"mocha": "^3.2.0", | ||
"semistandard": "^9.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
25740
2
22
464