1module.exports = function mod(number, modulo) { 2 var remain = number % modulo; 3 return Math.floor(remain >= 0 ? remain : remain + modulo); 4}; 5 6