It does support the same functionality offered by
numpy-financial but it only support scalar values (no numpy-like array values) and it does not support decimal values.
npm install --save-dev financial
yarn add financial
This library exports its functionality using different module formats.
const financial = // ./index.js// use `financial.fv`, `financial.pmt`, etc.
or, leveraging destructuring
const fv pmt = // ./index.js// use `fv`, `pmt`, etc.
An optimized Commonjs for browsers can be imported directly from the web:
Note: make sure you replace the
x.y.z with the correct version you want to use.
ESM (EcmaScript Modules)
Also working with Typescript
// use `fv`, `pmt`, etc.
default export in the ESM implementation, so you have to explicitely import the functionality you need, one by one.
Below is a list of commands you will probably find useful.
yarn start: Runs the project in development/watch mode. Your project will be rebuilt upon changes.
npm run buildor
yarn build: Bundles the package to the
distfolder. The package is optimized and bundled with Rollup into multiple format (CommonJS, UMD, and ES Module).
npm run build:docsor
yarn build:docs: Builds the API documentation in the
yarn test: Runs the test watcher (Jest) in an interactive mode. it runs tests related to files changed since the last commit.
npm run test:watchor
yarn test:watch: runs the tests in watch mode
Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.
You can also submit PRs as long as you adhere with the code standards and write tests for the proposed changes.
Licensed under MIT License. © Luciano Mammino.