cyclic-next
Get the cyclic next integer.
Features
Finds the cyclic next integer of a given number given the maximum bound.
e.g.
Given maximum bound of 5
1 / \0 2 \ / 4-3
cyclic next of 4
will be 0
.
Install
npm install cyclic-next
Usage
; //=> 1 //=> 2 //=> 3 //=> 4 //=> 0 //=> 0 //=> 2
Author
License
Contributing
Contributions are highly welcome! This repo is commitizen friendly — please read about it here.