Socket
Socket
Sign inDemoInstall

algostrata

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algostrata - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

47

build/index.js

@@ -10,2 +10,3 @@ "use strict";

exports.simpleCostDifference = simpleCostDifference;
exports.costDifference = costDifference;
exports["default"] = void 0;

@@ -65,10 +66,44 @@

// initialValue: Number
// baseAaop: Number
// baseAaopFraction: Number
// baseCost: Number
// newAaop: Number
// newAaopFraction: Number
// newCost: Number
function simpleCostDifference(initialValue, baseAaop, baseCost, newAaop, newCost) {
return initialValue * (baseAaop + baseCost - (newAaop + newCost));
function simpleCostDifference(initialValue, baseAaopFraction, baseCost, newAaopFraction, newCost) {
return initialValue * (baseAaopFraction + baseCost - (newAaopFraction + newCost));
} // function savingsAfterYear
// Calculates the difference in costs for a single year
//
// Arguments:
// initialValue: Number
// baseAaopFraction: Number
// baseCost: Number
// newAaopFraction: Number
// newCost: Number
// ---------------
// Returns:
// totalBaseCostFraction: Number
// totalBaseCost: Number
// totalNewCostFraction: Number
// totalNewCost: Number
// totalSaved: Number
// totalSavedFraction: Number
function costDifference(initialValue, baseAaopFraction, baseCost, newAaopFraction, newCost) {
var totalBaseCostFraction = baseAaopFraction + baseCost;
var totalBaseCost = initialValue * totalBaseCostFraction;
var totalNewCostFraction = newAaopFraction + newCost;
var totalNewCost = initialValue * totalNewCostFraction;
var totalSaved = totalBaseCost - totalNewCost;
var totalSavedFraction = totalBaseCostFraction - totalNewCostFraction;
return {
totalBaseCostFraction: totalBaseCostFraction,
totalBaseCost: totalBaseCost,
totalNewCostFraction: totalNewCostFraction,
totalNewCost: totalNewCost,
totalSaved: totalSaved,
totalSavedFraction: totalSavedFraction
};
}

@@ -79,4 +114,6 @@

differenceAfterYearWithFirstYear: differenceAfterYearWithFirstYear,
valueAtYearWithStandardDeviation: valueAtYearWithStandardDeviation
valueAtYearWithStandardDeviation: valueAtYearWithStandardDeviation,
simpleCostDifference: simpleCostDifference,
costDifference: costDifference
};
exports["default"] = _default;

5

package.json
{
"name": "algostrata",
"version": "1.2.0",
"version": "1.3.0",
"description": "calculation library for algostrata",

@@ -11,3 +11,4 @@ "main": "build/index.js",

"test": "mocha './src/**/*.test.js' --require @babel/register",
"lint": "eslint ."
"lint": "eslint .",
"pipeline": "mocha './src/**/*.test.js' --require @babel/register && eslint . && babel src -d build"
},

@@ -14,0 +15,0 @@ "author": "Algostrata",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc