@buildingsblock/core
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -144,7 +144,11 @@ "use strict"; | ||
}); | ||
if (!stratasWithContingencyReserveFundContributions.length) return { | ||
average: null, | ||
min: null, | ||
max: null | ||
}; | ||
if (!stratasWithContingencyReserveFundContributions.length) { | ||
return { | ||
average: null, | ||
min: null, | ||
max: null | ||
}; | ||
} | ||
var metrics = stratasWithContingencyReserveFundContributions.map(function (x) { | ||
@@ -240,3 +244,4 @@ var contingencyReserveFundContributions = _lodash.default.orderBy(x.contingencyReserveFundContributions, ['at'], ['desc'])[0].value; | ||
var budget = new _decimal.Decimal(_lodash.default.orderBy(x.budget, ['at'], ['desc'])[0].value); | ||
return new _decimal.Decimal(contingencyReserveFund).dividedBy(budget.minus(contingencyReserveFundContributions)); | ||
var operatingBudget = budget.minus(contingencyReserveFundContributions); | ||
return contingencyReserveFund.dividedBy(operatingBudget); | ||
}); | ||
@@ -258,3 +263,4 @@ return (0, _utils.toFixed)((0, _utils.average)(metrics), 2); | ||
var budget = new _decimal.Decimal(_lodash.default.orderBy(x.budget, ['at'], ['desc'])[0].value); | ||
return new _decimal.Decimal(contingencyReserveFundContributions).dividedBy(budget.minus(contingencyReserveFundContributions)); | ||
var operatingBudget = budget.minus(contingencyReserveFundContributions); | ||
return contingencyReserveFundContributions.dividedBy(operatingBudget); | ||
}); | ||
@@ -271,2 +277,3 @@ return (0, _utils.toFixed)((0, _utils.average)(metrics), 2); | ||
postalCode: String, | ||
// TODO: move to .location | ||
builtAt: Number, | ||
@@ -309,6 +316,4 @@ elevators: Number, | ||
}], | ||
pets: Boolean, | ||
smoking: Boolean, | ||
rentals: Boolean, | ||
streets: [String] | ||
streets: [String] // TODO: move to .location | ||
}, { | ||
@@ -315,0 +320,0 @@ timestamps: true |
{ | ||
"name": "@buildingsblock/core", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Core code base for Eli", | ||
@@ -26,3 +26,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"decimal.js": "^10.0.1", | ||
"decimal.js": "10.0.1", | ||
"lodash": "4.17.10" | ||
@@ -34,3 +34,3 @@ }, | ||
"@babel/preset-env": "7.0.0-beta.52", | ||
"@babel/register": "^7.0.0-beta.52", | ||
"@babel/register": "7.0.0-beta.52", | ||
"ava": "1.0.0-beta.6", | ||
@@ -37,0 +37,0 @@ "babel-eslint": "8.2.5", |
704
65555
11
+ Addeddecimal.js@10.0.1(transitive)
- Removeddecimal.js@10.5.0(transitive)
Updateddecimal.js@10.0.1