Comparing version 1.0.4 to 1.0.6
@@ -18,6 +18,7 @@ #!/usr/bin/env node | ||
var toPrint = stocks.reduce(function(prev, stock) { | ||
// stock.el quotes in pre-market | ||
// stock.l quotes during the market | ||
var p = stock.el || stock.l; | ||
return prev + sprintf("%s %.2f (%.2f%%) ", stock.t, p, stock.cp); | ||
if (stock.el && stock.ecp) { // pre-market, after-hours | ||
return prev + sprintf("%s %.2f (%.2f%%) ", stock.t, stock.el, stock.ecp); | ||
} else { | ||
return prev + sprintf("%s %.2f (%.2f%%) ", stock.t, stock.l, stock.cp); | ||
} | ||
}, ''); | ||
@@ -24,0 +25,0 @@ console.log(toPrint); |
@@ -5,3 +5,3 @@ { | ||
"description": "command line stock ticker", | ||
"version": "1.0.4", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -8,0 +8,0 @@ "main": "index.js", |
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
10069
31