Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
asset-depreciation-calculator
Advanced tools
Calculate the asset depreciation
$ npm install asset-depreciation-calculator
const calculateDepreciation = require("asset-depreciation-calculator");
calculateDepreciation(
20000,
"2016-08-01",
5,
)
// => [{
// year: 2016,
// depreciationMonths: 5,
// depreciationAmount: 1666.67,
// percentage: 8.33,
// startValue: 20000,
// endValue: 18333.33,
// }, {
// year: 2017,
// depreciationMonths: 12,
// depreciationAmount: 4000,
// percentage: 20,
// startValue: 18333.33,
// endValue: 14333.33,
// }, {
// year: 2018,
// depreciationMonths: 12,
// depreciationAmount: 4000,
// percentage: 20,
// startValue: 14333.33,
// endValue: 10333.33,
// }, {
// year: 2019,
// depreciationMonths: 12,
// depreciationAmount: 4000,
// percentage: 20,
// startValue: 10333.33,
// endValue: 6333.33,
// }, {
// year: 2020,
// depreciationMonths: 12,
// depreciationAmount: 4000,
// percentage: 20,
// startValue: 6333.33,
// endValue: 2333.33,
// }, {
// year: 2021,
// depreciationMonths: 7,
// depreciationAmount: 2333.33,
// percentage: 11.67,
// startValue: 2333.33,
// endValue: 0,
// }]
Type: number
Type: string
- should be a correct date string. For example: "2016-08-01"
Type: number
FAQs
Asset Depreciation Calculator
The npm package asset-depreciation-calculator receives a total of 188 weekly downloads. As such, asset-depreciation-calculator popularity was classified as not popular.
We found that asset-depreciation-calculator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.