1.2.0 • Published 3 years ago

asset-depreciation-calculator v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago