finjs
v0.0.2
Published
Finance Calculator
Downloads
14
Maintainers
Readme
finjs
- Financial calculator for taxes: calculate net, VAT and gross amounts.
- :de: Finanzrechner: Steuer, Netto, MwSt und Brutto berechnen.
Features:
- correct floating point calculations.
- calculate taxes, net, VAT and gross amounts.
- set precision of decimal places
Development features:
- unit tests for every function
- UMD (Universal Module Definition) - runs in Node, AMD or browser.
Install
- node.js:
npm i --save finjs
- browser:
<script src="/path/to/fin.js"></script>
Use
Addition and Multiplication
fin(0.1 + 0.2) === 0.3;
// truefin(2.18 * 100) === 218;
// true
Net, Vat and Gross
fin.vat(100) === 19;
// truefin.gross(100) === 119;
// truefin.net(119) === 100;
// truefin.vatFromGross(119) === 19;
// truefin.validateNetVatGross([100, 19, 119]) === true;
// true
Roadmap
- Create user-friendly github.io page for the calculations with social links.
- Add additional functions as needed for the creating of German invoices and calculation of taxes.
Support
- If you find any issue or have a question, please open a GitHub issue.
License
Inspiration
- Inspired by Fincalc.
History
- 0.0.2 - add
fin.validateNetVatGross([net, vat, gross])
function and tests. - 0.0.1 - initial commit