JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30665
  • Score
    100M100P100Q157882F
  • License MIT

A Zero-dependency TypeScript/JavaScript port of numpy-financial

Package Exports

  • financial

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (financial) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Financial

CI

A Zero-Dependency TypeScript / JavaScript financial utility library inspired by numpy-financial

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.

Install

With npm:

npm install --save-dev financial

Or, with yarn:

yarn add financial

Example usage:

import { fv } from 'financial'

fv(0.05 / 12, 10 * 12, -100, -100) // 15692.928894335748

Implemented functions

  • fv
  • pmt
  • nper
  • ipmt
  • ppmt
  • pv
  • rate
  • irr
  • npv
  • mirr

Local Development

Below is a list of commands you will probably find useful.

  • npm start or yarn start: Runs the project in development/watch mode. Your project will be rebuilt upon changes.
  • npm run build or yarn build: Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple format (CommonJS, UMD, and ES Module).
  • npm run build:docs or yarn build:docs: Builds the API documentation in the docs folder using typedoc.
  • npm test or 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:watch or yarn test:watch: runs the tests in watch mode

Contributing

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.

License

Licensed under MIT License. © Luciano Mammino.