asset-depreciation-calculator
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -10,2 +10,7 @@ "use strict"; | ||
}; | ||
const assertPurchaseDate = (date) => { | ||
if (isNaN(date.valueOf())) { | ||
throw new TypeError('`purchaseDate` is invalid.'); | ||
} | ||
}; | ||
const assertDepreciationYears = (years) => { | ||
@@ -39,2 +44,3 @@ if (years < 1) { | ||
assertPurchaseAmount(purchaseAmount); | ||
assertPurchaseDate(purchaseDate); | ||
assertDepreciationYears(totalDepreciationYears); | ||
@@ -41,0 +47,0 @@ const purchaseMonth = new Date(purchaseDate).getMonth() + 1; |
{ | ||
"name": "asset-depreciation-calculator", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Asset Depreciation Calculator", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
10700
99