Socket
Socket
Sign inDemoInstall

finance-sim

Package Overview
Dependencies
15
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    finance-sim

Simulates daily transactions in a bank account


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

finance-sim

A simple simulator which simulates what will happen to your bank account on a daily basis given a certain set of transactions and bank fees.

Usage

First, install finance-sim:

npm i -g finance-sim

Then, add your transactions and bank fees to config.toml. Here's an example:

[[bank-fees]]
name   = "Overdraft Fee"
entity = "Chase Bank"
amount = -34
if     = "balance < 0 && expensesMade"

[[transactions]]
name   = "My Paycheque"
entity = "ACME, Co."
amount = 2000
when   = "firstnotweekend(monthly(20))"

[[transactions]]
name   = "Rent"
entity = "My Landlord"
amount = -1500
when   = "monthly(1)"

Then run the script:

# finance-sim <starting balance> [start date] [end date]

finance-sim 3400 2017-1-1 2017-2-1

And you'll get output much like this:

Sun, 1 January 2017
TRX:      -$1,500.00  Rent                            My Landlord
Ending:    $1,900.00

Fri, 20 January 2017
TRX:       $2,000.00  My Paycheque                    ACME, Co.
Ending:    $3,900.00

Wed, 1 February 2017
TRX:      -$1,500.00  Rent                            My Landlord
Ending:    $2,400.00

Run finance-sim --help to see more command-line options.

Licence

MIT

Keywords

FAQs

Last updated on 22 Jul 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc