This package has been deprecated

Author message:

This package is no longer maintained

triodos-csv

0.1.0 • Public • Published

nodejs-triodos

Parser voor Triodos data bestanden

Gebruik

Installatie en opzet via NPM:

npm install triodos-csv
var triodos = require('triodos-csv')

Of via Github

git clone https://github.com/fvdm/nodejs-triodos.git
var triodos = require('./nodejs-triodos/triodos.js')

Events

fail

( object )

Er is een probleem opgetreden bij het lezen van het bestand.

triodos.on( 'fail', function( reason ) {
    // reason.path      : padnaam van het bestand
    // reason.encoding  : vereiste tekenset
    // reason.error     : foutmelding
})

klaar

( array )

Alle transacties zijn verwerkt. De array bevat de transacties.

triodos.on( 'klaar', function( transacties ) {
    console.log( triodos.stats )
})

tx

( object )

Er is een transactie verwerkt.

triodos.on( 'tx', function( tx ) {
    console.log( tx.datum +' - '+ tx.bedrag +' - '+ tx.richting )
})

Functies

readCSV

( filepath, [callback] )

  • filepath - vereist - pad naar het CSV bestand om te verwerken.
  • callback - optioneel - callback functie ontvangt een array met alle transacties als alles verwerkt is.
triodos.readCSV( '~/Downloads/mutations.csv', function( transacties ) {
    console.log( 'Het bestand bevat '+ transacties.length +' transacties' )
})

Readme

Keywords

none

Package Sidebar

Install

npm i triodos-csv

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • franklin