mod-op Introduction: Modulo operator as a function for JavaScript, as it only has the remainder (%) operator by default. mod(dividend, divisor) Perform dividend modulo divisor Arguments dividend - Number divisor - Number Example var mod = require('mod-op'); var wrapped = mod(-128, 256);// 128