Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asset-depreciation-calculator

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-depreciation-calculator - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

12

dist/index.js

@@ -18,3 +18,3 @@ "use strict";

const assertDepreciationYears = (years) => {
if (isNaN(years) || years < 1 || years % 1 !== 0) { // Check if years is integer, not float.
if (isNaN(years) || years < 0 || years % 1 !== 0) { // Check if years is integer, not float.
throw new TypeError('`totalDepreciationYears` is invalid.');

@@ -54,2 +54,12 @@ }

let monthsLeftInLastYear = 0;
if (totalDepreciationYears === 0) {
return [{
year: purchaseYear,
depreciationMonths: 0,
depreciationAmount: purchaseAmount,
percentage: 1,
startAmount: purchaseAmount,
endAmount: 0,
}];
}
for (let index = 0; index < totalDepreciationYears; index++) {

@@ -56,0 +66,0 @@ // Current year

2

package.json
{
"name": "asset-depreciation-calculator",
"version": "1.0.1",
"version": "1.1.0",
"description": "Asset Depreciation Calculator",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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