@buildingsblock/core
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -29,5 +29,3 @@ "use strict"; | ||
}); | ||
return (0, _utils.toFixed)((0, _utils.average)(metrics.map(function (x) { | ||
return x; | ||
})), 2); | ||
return (0, _utils.toFixed)((0, _utils.average)(metrics), 2); | ||
}; | ||
@@ -50,5 +48,3 @@ | ||
}); | ||
return (0, _utils.toFixed)((0, _utils.average)(metrics.map(function (x) { | ||
return x; | ||
})), 2); | ||
return (0, _utils.toFixed)((0, _utils.average)(metrics), 2); | ||
}; | ||
@@ -102,3 +98,3 @@ | ||
if (!stratasWithSalesAndUnits.length) return null; | ||
var salesTurnOverRates = stratasWithSalesAndUnits.map(function (x) { | ||
var turnoverRates = stratasWithSalesAndUnits.map(function (x) { | ||
var latestSales = _lodash.default.orderBy(x.sales, ['at'], ['desc'])[0]; | ||
@@ -115,9 +111,9 @@ | ||
return { | ||
pastYear: (0, _utils.toFixed)((0, _utils.average)(salesTurnOverRates.map(function (x) { | ||
pastYear: (0, _utils.toFixed)((0, _utils.average)(turnoverRates.map(function (x) { | ||
return x.pastYear; | ||
})), 2), | ||
twoYearsAgo: (0, _utils.toFixed)((0, _utils.average)(salesTurnOverRates.map(function (x) { | ||
twoYearsAgo: (0, _utils.toFixed)((0, _utils.average)(turnoverRates.map(function (x) { | ||
return x.twoYearsAgo; | ||
})), 2), | ||
threeYearsAgo: (0, _utils.toFixed)((0, _utils.average)(salesTurnOverRates.map(function (x) { | ||
threeYearsAgo: (0, _utils.toFixed)((0, _utils.average)(turnoverRates.map(function (x) { | ||
return x.threeYearsAgo; | ||
@@ -124,0 +120,0 @@ })), 2) |
{ | ||
"name": "@buildingsblock/core", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Core code base for Buildingsblock", | ||
@@ -5,0 +5,0 @@ "main": "./lib/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
52004
10
392