Socket
Book a DemoInstallSign in
Socket

asset-depreciation-calculator

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-depreciation-calculator

Asset Depreciation Calculator

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
6
Created
Source

asset-depreciation-calculator

Calculate the asset depreciation

Installation

$ npm install asset-depreciation-calculator

Usage

const calculateDepreciation = require("asset-depreciation-calculator");

calculateDepreciation({
  purchaseAmount: 2000000,
  purchaseDate: new Date("2016-01-01"),
  totalDepreciationYears: 5,
})
// => [{
//   year: 2016,
//   depreciationMonths: 12,
//   depreciationAmount: 400000,
//   percentage: 0.2,
//   startAmount: 2000000,
//   endAmount: 1600000,
// }, {
//   year: 2017,
//   depreciationMonths: 12,
//   depreciationAmount: 400000,
//   percentage: 0.2,
//   startAmount: 1600000,
//   endAmount: 1200000,
// }, {
//   year: 2018,
//   depreciationMonths: 12,
//   depreciationAmount: 400000,
//   percentage: 0.2,
//   startAmount: 1200000,
//   endAmount: 800000,
// }, {
//   year: 2019,
//   depreciationMonths: 12,
//   depreciationAmount: 400000,
//   percentage: 0.2,
//   startAmount: 800000,
//   endAmount: 400000,
// }, {
//   year: 2020,
//   depreciationMonths: 12,
//   depreciationAmount: 400000,
//   percentage: 0.2,
//   startAmount: 400000,
//   endAmount: 0,
// }]

API

calculateDepreciation({ purchaseAmount, purchaseDate, totalDepreciationYears })

purchaseAmount

The purchase amount in cents.

Type: number.

purchaseDate

Type: Date

totalDepreciationYears

Type: number

Keywords

depreciation

FAQs

Package last updated on 12 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts