Share your code. Components are building blocks, you are the architect.

utils/modulo
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
Divides the first parameter by the second and returns the remainder

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/modulo in your project
npm i @bit/bit.ramda.utils.modulo
Copied

modulo (a:Number, b:Number) : Number

Divides the first parameter by the second and returns the remainder. Note that this function preserves the JavaScript-style behavior for modulo. For mathematical modulo see mathMod.

Example

R.modulo(17, 3); //=> 2
     // JS behavior:
     R.modulo(-17, 3); //=> -2
     R.modulo(17, -3); //=> 2

     var isOdd = R.modulo(R.__, 2);
     isOdd(42); //=> 0
     isOdd(21); //=> 1

Arguments

a: Number

The value to the divide.

b: Number

The pseudo-modulus

Returns

Number

The result of `b % a`.