0.2.1 • Published 5 years ago

calc-transporte v0.2.1

Weekly downloads
7
License
ISC
Repository
github
Last release
5 years ago

Build Status

Coverage Status

Calculadora de Transporte AMBA

Biblioteca que permite calcular cuanto vas a gastar por transporte en Argentina en la region AMBA

Install

npm install calc-transporte

Usage

var CalcTransporte = require('calc-transporte');
var calcTransporte = new CalcTransporte();

var options = {
    roundtrip: true,
    benefit: false,
    weekTimes: 4,
    trips: [{ transport: "bus", price: 9.00, id: 0 },{ transport: "bus", price: 9.50, id: 2 }]
}

calcTransporte.calculate(options);

//Should be return
var result = {
    goingDailyTotal: 13.75,
    goingDailySaving: 4.75,
    returningDailyTotal: 14,
    returningDailySaving: 4.5,
    savingMonthly: 148,
    costMonthly: 444,
    goingTrip: [{transport:"bus",price:9,priceWithDiscount:9},{transport:"bus",price:9.5,priceWithDiscount:4.75}],
    returningTrip:[{transport:"bus",price:9.5,priceWithDiscount:9.5},{transport:"bus",price:9,priceWithDiscount:4.5}]
};

Tests

npm test

MIT Licenced

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago