/**
* Created by WORKER on 01-09-2015.
*/
var totalAmount = require('./financeCalculatorHelper')
// TODO these functions are not required. Adds up another layer of function call.
/**
* Take the records and find the result
* @param {Array} snippets Records to be processed
* @return {Number} Result of calculation
*/
function spent(snippets) {
return totalAmount(snippets)
}
/**
* Take the records and find the result
* @param {Array} snippets Records to be processed
* @return {Number} Result of calculation
*/
function lent(snippets) {
return totalAmount(snippets)
}
/**
* Take the records and find the result
* @param {Array} snippets Records to be processed
* @return {Number} Result of calculation
*/
function received(snippets) {
return totalAmount(snippets)
}
/**
* Take the records and find the result
* @param {Array} snippets Records to be processed
* @return {Number} Result of calculation
*/
function borrowed(snippets) {
return totalAmount(snippets)
}
module.exports = {
spent: spent,
lent: lent,
received: received,
borrowed: borrowed
}