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