7 lines
242 B
XML
7 lines
242 B
XML
module.exports.isPrev = function(current, index, list) {
|
|
return (current - 1 + list.length) % list.length === index;
|
|
}
|
|
|
|
module.exports.isNext = function(current, index, list) {
|
|
return (current + 1 + list.length) % list.length === index;
|
|
} |