Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

just-modulo

1.1.0 • Public • Published

just-modulo

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

import modulo from 'just-modulo';

modulo(7, 5); // 2
modulo(17, 23); // 17
modulo(16.2, 3.8); // 17
modulo(5.8, 3.4); //2.4
modulo(4, 0); // 4
modulo(-7, 5); // 3
modulo(-2, 15); // 13
modulo(-5.8, 3.4); // 1
modulo(12, -1); // NaN
modulo(-3, -8); // NaN
modulo(12, 'apple'); // NaN
modulo('bee', 9); // NaN
modulo(null, undefined); // NaN

Install

npm i just-modulo

DownloadsWeekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

2.56 kB

Total Files

4

Last publish

Collaborators

  • avatar