0.1.1 • Published 8 years ago

kontojs v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

#Kontojs

Kontojs is a library that lets you track transactions and balances of financial accounts (e.g. bank accounts).

Transactions can be added individually or imported from the content of a csv file.

##Installation

You can npm-install kontojs or download the konto.js file from the GitHub repository.

##Usage

Create a new dataset of financial data

ds = new kontojs.Dataset();

Add a bank account

ds.addAccount({id: 'mainAccount', openDate: '2016-08-30', initialBalance: 320.34});

Add a transaction

ds.addTransaction({amount: 100, date: '2016-09-01', origin: 'world', destination: 'mainAccount'});

Get balance

ds.getBalance('mainAccount');
> 420.34

Import csv data (supports several Austrian banks for now)

var newTransactions = kontojs.csvToKonto(someCsvString);
ds.addTransaction(newTransactions[0]);

Other methods:

ds.getAccount('mainAccount');
ds.setCurrentAccountBalance('mainAccount', 400);
ds.getTransactions({origin: 'mainAccount'}); // get all transactions that match a specific query
...
0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago