var RoundTo = function (value, place, base){ if (place === undefined) { place = 0; } if (base === undefined) { base = 10; } var p = Math.pow(base, - place); return Math.round(value * p) / p; } ; module.exports = RoundTo;