1.0.1 • Published 6 years ago

mod-op v1.0.1

Weekly downloads
136
License
MIT
Repository
github
Last release
6 years ago

mod-op

Build Status npm version Dependency Status devDependency Status

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