calc-transporte

0.2.1 • Public • Published

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

/calc-transporte/

    Package Sidebar

    Install

    npm i calc-transporte

    Weekly Downloads

    1

    Version

    0.2.1

    License

    ISC

    Unpacked Size

    318 kB

    Total Files

    14

    Last publish

    Collaborators

    • _kumaaa