Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mod.js « helpers « es-abstract « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5867fd979c0abf4bab582923925ae738d64e3951 (plain)
1
2
3
4
module.exports = function mod(number, modulo) {
	var remain = number % modulo;
	return Math.floor(remain >= 0 ? remain : remain + modulo);
};