
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
A new finance library for javascript. Intended to improve the workflow of JavaScript developers who are also in the finance industry. The package includes nice helper functions to quickly get values for ratio analysis, time value of money, managerial calculations etc.
Currently version 1.x.x only has Time Value of Money
npm install businessjs
<script src="https://cdn.jsdelivr.net/npm/businessjs@1.2.1/build/index.min.js"></script>
This will give you the package available for use in any front-end or Node.js environment.
Import syntax:
import businessjs from 'businessjs';
In node environment:
const businessjs = require('businessjs');
const tvm = businessjs.tvm;
Using the CDN is recommended though.
<!DOCTYPE html>
<html>
<head>
<script src="node_modules/businessjs/build/index.js"></script>
</head>
<body></body>
</html>
This should create the instance globally on the window
<script>
const tvm = businessjs.tvm;
</script>
Methods
futureValue = function(presentValue, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.presentValue = function(futureValue, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.numPeriods = function(presentValue, futureValue, interest, [perPeriod = 1])
perPeriod
The amount of times an interest rate is compounded defaults to 1.interest = function(presentValue, futureValue, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.futureValueAnnuityDue = function(payment, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.futureValueAnnuityAdvance = function(payment, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.presentValueAnnuityDue = function(payment, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.presentValueAnnuityAdvance = function(payment, interest, [numPeriods = 1, perPeriod = 1])
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 1.effectiveRate = function(nominalRate, perPeriod)
const tvm = require('businessjs').tvm;
// Convert the monthly nominal rate to yearly effective inline
tvm.futureValue(100, tvm.effectiveRate(0.1, 12), 1, 1);
amortisation = function(presentValue, interest, [numPeriods=1, perPeriod=12])
{
period,
payment,
interestPortion,
principlePortion,
totalBalance,
principleBalance
}
numPeriods
defaults to 1 as in 1 year.perPeriod
The amount of times an interest rate is compounded defaults to 12 payments per year.These are just the first few methods in version 1, Documentation will be updated as version improves.
FAQs
Fast and accurate business and financial calculations in JavaScript.
We found that businessjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.